In sh, is '[' a portable synonym
Tim Radzykewycz
radzy at calma.UUCP
Thu Nov 14 02:22:43 AEST 1985
In article <63 at hadron.UUCP> jsdy at hadron.UUCP (Joseph S. D. Yao) writes:
>In article <132 at oracle.UUCP> abbajay at oracle.UUCP (Dave Abbajay) writes:
>>I also have no REAL arguments against Guy's comments save one. '/bin/test'
>>is a *program* and '[]' is intrepreted by the shell in all Sys III (and
>>greater) Bourne shells.
>
>[Disclaimer:] I don't have the sV Bourne shell code or the Korn
>shell code in front of me; however, I don't remember '[' being
>treated as a special command. I do know that 'test' is linked
>to '['.
>References: VAX-11/780 running s5r1v1, s5r1v2, s5r2v1, s5r2v2.
A while back, the sysadm (somewhat junior) of a site I was working
on found the file '/bin/[', and thinking it was a junk file created
when something went wrong, he got rid of it. All kinds of shell
scripts broke. This is pretty conclusive evidence that '[' is
*not* treated specially, at least on the 4.1 (vax) system this
was on.
BTW: the sysadm was *me*.
--
Tim (radzy) Radzykewycz, The Incredible Radical Cabbage
calma!radzy at ucbvax.ARPA
{ucbvax,sun,csd-gould}!calma!radzy
More information about the Comp.unix.wizards
mailing list