Dot in PATH?

Tom Christiansen tchrist at convex.COM
Mon Jan 28 12:58:29 AEST 1991


>From the keyboard of data at buhub (Mark Hall):
:In <5528 at auspex.auspex.com> guy at auspex.auspex.com (Guy Harris) writes:
:
:> You thought incorrectly; UNIX shells, and the "exec[lv]p()" routines,
:> check only if "." is in the current command search path.
:
:Well, let me show you something:
:
:in my .profile is this path command:
:
:> PATH=:/usr/lbin:/usr/local/bin:/bin:/usr/bin:$HOME:$HOME/BIN:$HOME/USR:/usr/tmp:/tmp:/tmp/talk:
:
:if I run a program in the current directory (and it's not in my path command)
:my shell looks in the current directory FIRST.  This is also the way MS-DOS
:works, but that's a different notes-group.  This is why I made the original
:comment.  I grant that other shells may not work this way (I'm not saying that
:they have to be alike), but my shell DOES treat my commands this way.
:BTW: I'm running UNIX SYSTEM V v3.2(i think)

The colons in your path are not delimiters, but separators.  The somewhat
subtle difference is that in yours, you have a leading and trailing
null element in your list.  POSIX-incompliant systems have historically
interpreted null as dot.

---tom
--
"Hey, did you hear Stallman has replaced /vmunix with /vmunix.el?  Now
 he can finally have the whole O/S built-in to his editor like he
 always wanted!" --me (Tom Christiansen <tchrist at convex.com>)



More information about the Comp.unix.shell mailing list