Re: test or [ does not handle parentheses as stated in manpage

2022-09-06 Thread Julian Gilbey
On Tue, Sep 06, 2022 at 02:56:12PM +0100, Julian Gilbey wrote: > > > Ah, thanks! May I suggest that adding this information as a note in > > > the manpage would be very helpful? > > > > The man page says, in the `test' description: > > > > "E

Re: test or [ does not handle parentheses as stated in manpage

2022-09-06 Thread Julian Gilbey
On Tue, Sep 06, 2022 at 09:25:36AM -0400, Chet Ramey wrote: > On 9/6/22 1:51 AM, Julian Gilbey wrote: > > On Tue, Sep 06, 2022 at 12:03:20AM +0200, Andreas Schwab wrote: > > > On Sep 05 2022, Julian Gilbey wrote: > > > > > > > neither did using \( > &

Re: test or [ does not handle parentheses as stated in manpage

2022-09-06 Thread Julian Gilbey
On Mon, Sep 05, 2022 at 11:04:41PM -0400, Dale R. Worley wrote: > Julian Gilbey writes: > > Upgrading to bash 5.2.0(1)-rc2 did not help, neither did using \( > > instead of (, and neither did putting spaces around the parentheses. > > It's ugly. The first point i

Re: test or [ does not handle parentheses as stated in manpage

2022-09-05 Thread Julian Gilbey
On Mon, Sep 05, 2022 at 06:05:04PM -0400, Greg Wooledge wrote: > On Mon, Sep 05, 2022 at 09:55:29PM +0100, Julian Gilbey wrote: > > if [ ("$1" = "yes" -o "$1" = "YES") -a ("$2" = "red" -o "$2" = "RED") ] >

Re: test or [ does not handle parentheses as stated in manpage

2022-09-05 Thread Julian Gilbey
On Tue, Sep 06, 2022 at 12:03:20AM +0200, Andreas Schwab wrote: > On Sep 05 2022, Julian Gilbey wrote: > > > neither did using \( > > instead of (, and neither did putting spaces around the parentheses. > > You need to do both. Ah, thanks! May I suggest that adding th

test or [ does not handle parentheses as stated in manpage

2022-09-05 Thread Julian Gilbey
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall uname output: Linux erdos 5.18.0-4-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.18.16-1 (2022-08-10)