No subject
Sat Jan 2 09:13:29 CST 2010
`If the name is neither a shell function nor a builtin, and contains
no slashes, bash searches each element of the PATH for a directory
containing an executable file by that name. Bash uses a hash
table to remember the full pathnames of executable files. A full
search of the directories in PATH is performed only if the command is
not found in the hash table.`
I interpret that to mean if you call foo from /a/b/c then it
1) looks for /a/foo
2) looks for /a/b/foo
3) looks for /a/b/c/foo
4) iterates through $PATH, in order, looking for the first executable foo.
Colin
More information about the Cialug
mailing list