🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1860

Re: Question about 'test' (Was Re: testing if a file is present)

#1860
From: q.p.liu
Date: Fri, 30 Nov 1990 01:53
10 lines
1080 bytes
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] == "[".
Technical Details
Message-ID: <QPLIU.90Nov29205347@phoenix.princeton.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!princeton!idunno!qpliu
References: <ger.659126250@prisma> <1990Nov21.191638.19469@athena.mit.edu> <90326.175421PPH93@DMSWWU1A.BITNET> <4586@auspex.auspex.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <QPLIU.90Nov29205347@phoenix.princeton.edu>
Date: 30 Nov 90 01:53:47 GMT
References: <ger.659126250@prisma> <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