Notable bash $PATH behavior trivia
Erik Price
eprice at ptc.com
Fri Jan 3 13:35:07 EST 2003
Useful, I didn't know that. Thanks.
Erik
Michael O'Donnell wrote:
> I just noticed that I was able to execute
> programs in the current directory without
> prefixing their names with ./ and without
> having . in my $PATH. After saying WTF?
> a number of times I finally figured out that
> it's related to my PATH being defined with
> a leading colon, sorta like this:
>
> export PATH=:/bin:/usr/bin:/usr:local/bin
>
> ...so those of you who (for security reasons) are
> careful to exclude "." from your $PATH need also
> be careful about leading colons, apparently...
>
> _______________________________________________
> gnhlug-discuss mailing list
> gnhlug-discuss at mail.gnhlug.org
> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
>
More information about the gnhlug-discuss
mailing list