Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.shell Subject: Re: Question about 'test' (Was Re: testing if a file is present) Message-ID: <1990Dec2.210141.13170@athena.mit.edu> Date: 2 Dec 90 21:01:41 GMT References: <1990Nov21.191638.19469@athena.mit.edu> Sender: daemon@athena.mit.edu (Mr Background) Reply-To: jik@athena.mit.edu (Jonathan I. Kamens) Organization: Massachusetts Institute of Technology Lines: 23 In article , qpliu@phoenix.princeton.edu (q.p.liu) writes: |> In article <4586@auspex.auspex.com> guy@auspex.auspex.com (Guy Harris) writes: |> >"test"/"[" will then say "well, I was invoked as '[' rather than 'test'; |> >that means I should check to make sure my last argument is ']', and |> >complain otherwise." |> trying /bin/[ shows that it only checks if argv[0] == "[". Then either you did something wrong, or you're using a buggy version of "test." $ [ frep test: ] missing $ echo $? 255 $ [ frep ] $ echo $? 0 -- Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8085 Home: 617-782-0710