PATH Variable Empty Component

Empty Component in $PATH means "Current directory".

If you wish to include  the current directory in the search path.You need to keep ":" in $PATH.

Eg:
PATH=:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin Current directory first
PATH=/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin: Current directory last
PATH=/bin:/usr/bin:/usr/X11R6/bin::/usr/local/bin Current directory in middle

With above you can execute the scripts directly from your current path without ./ .

No comments:

Post a Comment