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