11-30-2012
Quote:
Originally Posted by
Corona688
Adding a relative directory into your PATH can have problems beyond the obvious.
Many shells cache a list of available commands they find in PATH. Put a relative directory in there, and they may not always find all available commands because they don't know the cache needs to be regenerated every time you cd. Some may even crash if you put a relative directory in PATH.
I never suggested that such a thing should be done. I simply noted that with PATH set to
. command lookup behaves like filename lookup (an observation which was followed by some of the disastrous consequences).
Building such a system would require auditing/rewritting all of its scripts. In the wake of such a feat, it shouldn't be too much trouble to disable the shell's caching, which in such an environment would serve no purpose.
Regards,
Alister
P.S. Corona, thanks for the icode markup fix.
Last edited by alister; 11-30-2012 at 01:58 PM..
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How can I get the results of a find back without the pathname
for example if i do
find ../../ -name \*.sql
i dont want to see
directory/directory/filename.sql
I only want to see filename.sql (3 Replies)
Discussion started by: MBGPS
3 Replies
2. Shell Programming and Scripting
With C Shell you can get the root, head, tail and extension of a pathname by using pathname variable modifiers.
Example Script:
#! /bin/csh
set pathvar=/home/WSJ091305.txt
echo $pathvar:r
echo $pathvar:h
echo $pathvar:t
echo $pathvar:e
The result of executing this script is:
... (7 Replies)
Discussion started by: BCarlson
7 Replies
3. UNIX for Advanced & Expert Users
Hi All,
We use tomcat web server and it will get terminated with below error:
connection to localhost:10.0 host broken (explicit kill or server shutdown)
Please let me know how to fix this error. (5 Replies)
Discussion started by: bache_gowda
5 Replies
4. UNIX for Dummies Questions & Answers
Hi
Could someone help me?
I'm not sure how to find the full pathname of a directory.
I just want to be able to specify a directory.
e.g
directory1/directory2/directory3/directory4/directory5
I want to be able to put in "directory5"
and then i want a return of the full address.
... (3 Replies)
Discussion started by: shomila_a
3 Replies
5. Cybersecurity
I'm running IPF on solaris 10
bash-3.00# ipf -V #display ipf version
ipf: IP Filter: v4.1.9 (592)
Kernel: IP Filter: v4.1.9
Running: yes
Log Flags: 0 = none set
Default: pass all, Logging: available
Active list: 1
Feature mask: 0x107
with the following rules
bash-3.00# ipfstat -o -i... (0 Replies)
Discussion started by: h@foorsa.biz
0 Replies
6. AIX
I want to run applet on AIX 6 machine.
I already have setup $DISPLAY variable for putty session by selecting X11 option.
I got below error for any X related commands (xclock, X, applet viewer )
X connection to localhost:10.0 broken (explicit kill or server shutdown). Please can anyone... (0 Replies)
Discussion started by: kailas.girase
0 Replies
7. Shell Programming and Scripting
I have executed the below perl script for copying the file from one server to another server using scp.
#!/usr/bin/perl -w
use Net::SCP::Expect;
use strict;
$server= "x.x.x.x";
my $source = "/mypath/mypath";
my $destination = "/home/";
print "Login...Starting scp...";
$user="admin";... (1 Reply)
Discussion started by: scriptscript
1 Replies
8. Shell Programming and Scripting
Hello,
I use the following SSH script to upload *.jpg files via FTP:
#!/usr/bin/expect
set timeout -1
spawn ftp -v -i
expect ""
send "\r"
expect "Password:"
send "\r"
expect "ftp>"
send "mput *.jpg\r"
expect "ftp>"
send "quit\r"
replaced with actual ftp server/account data.
... (5 Replies)
Discussion started by: mrpi007
5 Replies
9. IP Networking
Add explicit route to 10.128.255.41/32 , gateway: 10.128.201.254
if not working, please try gateway through management port: 10.128.55.254
Just want to double confirm if this would be the correct command
#route add -net 10.128.255.41/32 10.128.201.254
And if didnt work
#route add... (1 Reply)
Discussion started by: Thilagarajan
1 Replies
LEARN ABOUT DEBIAN
jifty::util
Jifty::Util(3pm) User Contributed Perl Documentation Jifty::Util(3pm)
NAME
Jifty::Util - Things that don't fit anywhere else
DESCRIPTION
absolute_path PATH
"absolute_path" converts PATH into an absolute path, relative to the application's root (as determined by "app_root") This can be called
as an object or class method.
canonicalize_path PATH
Takes a "path" style /foo/bar/baz and returns a canonicalized (but not necessarily absolute) version of the path. Always use "/" as the
separator, even on platforms which recognizes both "/" and "" as valid separators in PATH.
jifty_root
Returns the root directory that Jifty has been installed into. Uses %INC to figure out where Jifty.pm is.
share_root
Returns the 'share' directory of the installed Jifty module. This is currently only used to store the common Mason components, CSS, and JS
of Jifty and it's plugins.
app_root
Returns the application's root path. This is done by returning $ENV{'JIFTY_APP_ROOT'} if it exists. If not, Jifty tries searching upward
from the current directory, looking for a directory which contains a "bin/jifty". Failing that, it searches upward from wherever the
executable was found.
It "die"s if it can only find "/usr" or "/usr/local" which fit these criteria.
is_app_root PATH
Returns a boolean indicating whether the path passed in is the same path as the app root. Useful if you're recursing up a directory tree
and want to stop when you've hit the root. It does not attempt to handle symbolic links.
default_app_name
Returns the default name of the application. This is the name of the application's root directory, as defined by "app_root".
make_path PATH
When handed a directory, creates that directory, starting as far up the chain as necessary. (This is what 'mkdir -p' does in your shell).
require PATH
Uses UNIVERSAL::require to require the provided "PATH". Additionally, logs any failures at the "error" log level.
try_to_require Module
This method works just like "require", except that it suppresses the error message in cases where the module isn't found.
already_required class
Helper function to test whether a given class has already been loaded.
generate_uuid
Generate a new UUID using Data::UUID.
reference_to_data Object
Provides a saner output format for models than "MyApp::Model::Foo=HASH(0x1800568)".
stringify LIST
Takes a list of values and forces them into strings. Right now all it does is concatenate them to an empty string, but future versions
might be more magical.
AUTHOR
Various folks at Best Practical Solutions, LLC.
perl v5.14.2 2010-12-08 Jifty::Util(3pm)