Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!linac!uwm.edu!wuarchive!uunet!ingr! From: rob@b15.INGR.COM (Rob Lemley) Newsgroups: comp.unix.shell Subject: Re: Question about 'test' (Was Re: testing if a file is present) Message-ID: <1807@b15.INGR.COM> Date: 28 Nov 90 20:35:24 GMT References: <1990Nov21.191638.19469@athena.mit.edu> <90326.175421PPH93@DMSWWU1A.BITNET> <14048@ulysses.att.com> Distribution: comp.unix Organization: Intergraph Huntsville Lines: 11 th: b15!rob In <14048@ulysses.att.com> ekrell@ulysses.att.com (Eduardo Krell) writes: >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. Also, the test command looks at argv[0] to see if it was called "test" or "[". If "[" then test verifies that the closing "]" argument is there. If the closing "]" is not there, test exits with a status of 1 (false). Rob