Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!princeton!idunno!qpliu From: qpliu@phoenix.princeton.edu (q.p.liu) Newsgroups: comp.unix.shell Subject: Re: Question about 'test' (Was Re: testing if a file is present) Message-ID: Date: 30 Nov 90 01:53:47 GMT References: <1990Nov21.191638.19469@athena.mit.edu> <90326.175421PPH93@DMSWWU1A.BITNET> <4586@auspex.auspex.com> Sender: news@idunno.Princeton.EDU Reply-To: qpliu@phoenix.princeton.edu Organization: Princeton University Lines: 10 In-reply-to: guy@auspex.auspex.com's message of 29 Nov 90 19:04:36 GMT In article <4586@auspex.auspex.com> guy@auspex.auspex.com (Guy Harris) writes: >>But what will the (bourne-) shell say about... >>> >>> If [ -r filename ]; then >"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] == "[".