Question about 'test' (Was Re: testing if a file is present)
Rob Lemley
rob at b15.INGR.COM
Thu Nov 29 07:35:24 AEST 1990
In <14048 at ulysses.att.com> ekrell at 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
More information about the Comp.unix.shell
mailing list