The "test" program

edwards at felix.UUCP edwards at felix.UUCP
Tue Aug 16 06:06:34 AEST 1983


I haven't always kept up with unix-wizards, so this may be an old
topic, but I'm curious to hear what anyone knows about this.

I was recently helping someone here debug a (Bourne) shell script
which made use of the "test" program.  It didn't seem to work.  I
wound up reading the source code, and concluded that I couldn't
understand how the program could POSSIBLY perform as the manual
advertises.  The problem shows up with any expressions more complex
than the most trivial (although I suspect the usage of "test" with
complex expressions is rare).  Among other things, the syntax
parsed by the program does not seem to correspond to the syntax
described in the manual, and the program doesn't seem to handle
parenthesized subexpressions correctly.

Although this is not of pressing importance (the problem can be
circumvented) it would be surprising to me to find that a program
like that had survived this long without working right.  Am I
missing either a later distribution of the program or some of my
marbles?  We are running 4.1BSD.

				Thanks in advance,
				Dave Edwards
				{ucbvax, decvax, ...}!trw-unix!felix!edwards



More information about the Comp.unix.wizards mailing list