Question about 'test' (Was Re: testing if a file is present)

Eduardo Krell ekrell at ulysses.att.com
Fri Nov 23 14:15:32 AEST 1990


In article <90326.175421PPH93 at DMSWWU1A.BITNET> PPH93 at 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 at ulysses.att.com



More information about the Comp.unix.shell mailing list