For safety reasons, the current directory is not included in your path variable. There are good reasons, however I can't remember any good examples. That's why the ./ is required. If you want to run this script, copy it to a location that is in $PATH (e.g. /usr/local/bin). To find out what's in your users path, type 'echo $PATH'. If you don't care about safety, you can add the current directory to your path by adding the following line to ~/.bashrc (or /etc/profile.local ?):
Code:
export PATH=$PATH:.
EDIT (found an example):
Quote:
Imaging you write a script and call it "ls" then save it in a folder where you have access, let's say /tmp. Now if you get your admin to run "ls" in /tmp as root and have "." in the PATH, that will run your script instead of running the real "ls". This way you can do some nasty trick. This is why "." is not in your PATH.
|