Re: Bug in parameter parsing of test built-in

2015-07-27 Thread Eric Blake
On 07/27/2015 07:37 AM, Alexander Sulfrian wrote: > Hi, > > I discovered a bug in the parameter parsing of the test built-in: No, you merely (re-)discovered that '-a' and '-o' are inherently ambiguous as operators, and should never be used with test. Even POSIX recommends against their use, and

Bug in parameter parsing of test built-in

2015-07-27 Thread Alexander Sulfrian
Hi, I discovered a bug in the parameter parsing of the test built-in: $ test -n '<' -a true -bash: test: too many arguments It occurs with '>' and '<' but only with a second test combined with -a or -o. If also occurs if the < or > are saved in a variable: $ foobar='<' $ test -n