On 03/17/2015 02:23 PM, Robson Júnior wrote:
`test -e` with no filename being passed to. It returns 0, although it should be 1.

No, 'test -e' should exit with status 0, because '-e' is a nonempty string. In general, 'test X' exits with status 0 if and only if X is nonempty. POSIX requires this behavior; see:

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html

and search for "1 argument".



Reply via email to