Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ucbvax!ulysses!ulysses.att.com!ekrell From: ekrell@ulysses.att.com (Eduardo Krell) Newsgroups: comp.unix.shell Subject: Re: Question about 'test' (Was Re: testing if a file is present) Message-ID: <14048@ulysses.att.com> Date: 23 Nov 90 03:15:32 GMT References: <1990Nov21.191638.19469@athena.mit.edu> <90326.175421PPH93@DMSWWU1A.BITNET> Sender: netnews@ulysses.att.com Distribution: comp.unix Organization: AT&T Bell Labs Lines: 14 In article <90326.175421PPH93@DMSWWU1A.BITNET> PPH93@DMSWWU1A.BITNET (Thomas Heller) writes: >But what will the (bourne-) shell say about... >> >> if [ -r filename ]; then > ^ Why should the shell do anything about it? The "]" is an argument to "[" (which is a link to test). The shell just passes that token as an argument when it exec's test. Eduardo Krell AT&T Bell Laboratories, Murray Hill, NJ UUCP: {att,decvax,ucbvax}!ulysses!ekrell Internet: ekrell@ulysses.att.com