Gentoo Archives: gentoo-user

From: Robert Persson <ireneshusband@××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] /usr/bin/test doesn't seem to do anything
Date: Sat, 28 Jan 2006 07:47:58
Message-Id: 200601272343.08941.ireneshusband@yahoo.co.uk
In Reply to: Re: [gentoo-user] /usr/bin/test doesn't seem to do anything by Richard Fish
1 On Thursday 26 January 2006 16:22 Richard Fish was like:
2 > test doesn't output anything...it indicates success/failure with the
3 > exit code.  
4 ...
5 > As others have said though, watch out for the 'test' command built-in
6 > to many shells, as the behavior there is defined by the shell.
7 > Generally though, /usr/bin/test and bash test should work the same....
8
9 It turns out that I was mistaken and the script was in fact invoking the bash
10 built-in test (the /usr/bin/test stuff was my overactive imagination).
11
12 /usr/bin/test is still weird, as Eric Bliss said, because it doesn't print
13 help and version info the way the manpage says it should.
14
15 A difference between the two tests is that, for /usr/bin/test, a non-zero exit
16 status means false, whereas bash test resolves to a non-zero value when true.
17
18 Haven't had time to take another look at the bash script I was wrestling with.
19 So still not sure whether bash test is being weird as well.
20
21
22 --
23 Robert Persson
24
25 Conspiracy Bears:
26 Once upon a time there were lots of conspiracy bears...
27
28
29 --
30 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] /usr/bin/test doesn't seem to do anything "Beau E. Cox" <beaucox@×××××××××.com>