home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / sun / misc / 6470 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  1.0 KB

  1. Path: sparky!uunet!auspex-gw!guy
  2. From: guy@Auspex.COM (Guy Harris)
  3. Newsgroups: comp.sys.sun.misc
  4. Subject: Re: Amusing Sun Anecdote
  5. Message-ID: <16606@auspex-gw.auspex.com>
  6. Date: 24 Jan 93 20:18:16 GMT
  7. References: <derosa.726880710@marble> <tommy.727112843@hilbert> <1623@rand.mel.cocam.oz.au> <1993Jan22.170843.18923@ensmp.fr>
  8. Sender: news@auspex-gw.auspex.com
  9. Organization: Auspex Systems, Santa Clara
  10. Lines: 23
  11. Nntp-Posting-Host: auspex.auspex.com
  12.  
  13. >Well, that happens when `.' is not the first dir in your path.  :-)
  14.  
  15. Err, well, actually, it can happen even when "." *is* the first
  16. directory in your path:
  17.  
  18.     bootme$ ed test
  19.     ?test: No such file or directory
  20.     a
  21.     #! /bin/sh -
  22.     echo Yup, this is test
  23.     .
  24.     w
  25.     36
  26.     q
  27.     bootme$ chmod +x test
  28.     bootme$ PATH=.:$PATH; export PATH
  29.     bootme$ test
  30.     bootme$ 
  31.  
  32. My shell happens to be the Korn shell, but other shells have a built-in
  33. "test" command as well (both the Bourne shell in SunOS [345].x, and the
  34. version of the Bourne-again shell we have here, have a built-in "test"
  35. command, and give the exact same behavior).
  36.