I am aware that when we fire a command at the shell prompt, unix looks
in all the directories in the the PATH environment variable and runs
the first filename matching the command name in the directories in the
PATH in order...
I was wondering if there is something similar for non-executable files
as well.
For example, if I have a file foo.txt and I do
$ cat foo.txt
Is it possible in any way for foo.txt to be searched for in a list of
directories and for the first match to be typed out?
Thanks, would appreciate any pointers...
~Greg.
No, there's no standard mechanism for this, nor even a common convention
as far as I know.
There are a few special cases, though. For instance, in some shells the
"cd" built-in will use a variable CDPATH. And the man command use
MANPATH to find man pages outside the standard locations.
--
Barry Margolin, bar...@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***