Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ncar!gatech!udel!princeton!idunno!qpliu From: qpliu@phoenix.princeton.edu (q.p.liu) Newsgroups: comp.unix.shell Subject: Re: Question about 'test' Message-ID: Date: 1 Dec 90 01:27:35 GMT References: <1990Nov21.191638.19469@athena.mit.edu> <1779@seti.inria.fr> Sender: news@idunno.Princeton.EDU Reply-To: qpliu@phoenix.princeton.edu Organization: Princeton University Lines: 18 In-reply-to: deschamp@minos.inria.fr's message of 30 Nov 90 16:38:09 GMT In article <1779@seti.inria.fr> deschamp@minos.inria.fr (Philippe Deschamp) writes: >In article , >qpliu@phoenix.princeton.edu (q.p.liu) writes: >|> trying /bin/[ shows that it only checks if argv[0] == "[". > *Never* generalize :-). On my workstation (Sun 3/60 under SunOS 4.0.3): (Ok, was on sunos 4.1, 4.0.3 (sun4) and ctss (cray xmp, cray 2) running sh) (btw, the string comparision is as in awk, not as in C) >What I do not understand is this: > $ /bin/[ > $ > >Why no complaint in the last case ? In this case, argv[0] != "[", hence no check for ].