In sh, is '[' a portable synonym

Joseph S. D. Yao jsdy at hadron.UUCP
Sun Nov 10 02:38:46 AEST 1985


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 '['.  It does not seem logical to have it both ways, especially
when one can be changed without changing the other.  (Did I  s a y
that everything progrmmers do is logical?)

References: VAX-11/780 running s5r1v1, s5r1v2, s5r2v1, s5r2v2.

(Note:  PLEASE reference the system you're talking about.  I don't
know whether D.A. was talking about vaxen (prob'ly) or one of the
myriad 680X0 systems, or 3B's, or what.)
-- 

	Joe Yao		hadron!jsdy at seismo.{CSS.GOV,ARPA,UUCP}



More information about the Comp.unix.wizards mailing list