bash bug? test -r works
In debugging a shell script, I discovered that bash (and ash)
treat
test -x
as true. Normally, one would use "test -x SOMEFILE", and
I would have expected a bare "test -x" to be a syntax error.
However, both bash and ash return status 0 (true) with no
diagnostics.
In contrast, /bin/sh on SGI's IRIX 6.5 returns a diagnostic
$ test -x
/bin/sh: test: argument expected
$ echo $?
1
It looks like a bug in bash & ash to me. Is it?
-S
--
by Rocket to the Moon,
by Airplane to the Rocket,
by Taxi to the Airport,
by Frontdoor to the Taxi,
by throwing back the blanket and laying down the legs ...
- They Might Be Giants
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: