[97914] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: '/usr/bin/['

daemon@ATHENA.MIT.EDU (Cameron Simpson)
Thu Nov 5 19:03:46 1998

Date: Fri, 6 Nov 1998 11:03:31 +1100 (EST)
X-Original-To: redhat-list@redhat.com
From: Cameron Simpson <cs@zip.com.au>
Reply-to: cs@zip.com.au
To: redhat-list@redhat.com
Resent-From: redhat-list@redhat.com

On 5 Nov 1998, in message <Pine.LNX.3.95.981105124429.4270C-100000@snt-gw.snt.isternet.sk>
  Tomas Buday <tomas@snt.sk> wrote:
| ...more on /usr/bin/[
| it's a symlink pointing at /usr/bin/test...right!
| suppose the followong example:
| "test 1 -eq 5" ... this works fine (try echo $?)
| so "[ 1 -eq 5" should work as well, but it doesn't.
| ...it requires a closing "]"
| why is this?

I'm trying to figure out if you're asking a question, or badly phrasing a
let's-educate-the-masses blurb.

Assuming the former: test had always checked argv[0] for [ and required the
closing ] when used that way.
--
Cameron Simpson, DoD#743        cs@zip.com.au        http://www.zip.com.au/~cs/

Who are all you people and why are you in my computer?	- Kibo


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
		http://www.redhat.com http://archive.redhat.com
         To unsubscribe: mail redhat-list-request@redhat.com with 
                       "unsubscribe" as the Subject.


home help back first fref pref prev next nref lref last post