It's best to start a new thread if you have a new question, because more people who are likely to be able to answer it will see it.
I know the answer to this one so it's OK here.
You can execute any file if you change it's permissions to 0777 and use dotslash:
chmod 0777 myprog &&
./myprog
will execute it. However, if the directory is included in the PATH variable, it can be executed simple by typing it at the command line:
myprog
There's a bit more to it though, as the PATH variable store lists of directories, not files. You have to think about PATH variables from a security point of view, because say if some ne'erdogood were to write a nasty program called bash and put it in your home directory, if the home directory was listed before the /bin directory inb the PATH variable, then when you type 'bash', his program would execute, not the bash shell as you expected.
I think the tutorial BASH Progamming in the links section on this site mentions this (it should anyway)
Bert
Last edited by Bert; 01-25-2003 at 06:29 PM.
|