bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: minor bug in 'test' man page


From: Eric Blake
Subject: Re: minor bug in 'test' man page
Date: Fri, 05 Aug 2005 13:59:17 +0000

> there is a ']' missing in test's man page:
> 
> SYNOPSIS
> ~       test EXPRESSION
> ~       [ EXPRESSION ]
> ~       [ OPTION
> 

Nope, that is intentional.

Compare:

$ /bin/test --help
0  # Yep, --help is a non-zero length string
$ /bin/[ --help ]; echo $?
0  # Yep, --help is a non-zero length string
$ /bin/[ --help; echo $?
Usage: test EXPRESSION
...
0   # Oh, you wanted some help!

The only options supported by the source code that gets compiled into
both test and [ are the standard --help and --version, and those options
are only supported when the program name is spelled [ and there
is nothing else on the command line, so as to comply with POSIX.

--
Eric Blake






reply via email to

[Prev in Thread] Current Thread [Next in Thread]