Re: Relative pathname for executable file
You are correct but one detail.
It is not required to type an absolute path, it may be relative. In fact ./ is relative (it does not start with /).
But you are correct, when you do not provide a path yourself, the shell will look at your PATH environment variable and search from left to right in all the directories until it finds a file of the name you gave and then try to execute it.
And it is the inclusion of relative pathes in the PATH variable (and ./ is the most (mis)used one here) that can create havoc because it depends upon what your working directory is at the very moment you call something where it will end up somewhere relative to that working directory.
__________________
Henk van Velden
|