Re: simple bug/compat question

2009-01-23 Thread Chet Ramey
Linda Walsh wrote: > >> It's not a bug. > --- > It's a feature... ;-) > > >> test/[ uses -a and -o for `and' and `or'; the >> conditional command uses && and || for that purpose. This is >> they way it's documented. > --- > Would it be inappropriate if "[[" were to treat "-a" && "-o" iden

Re: simple bug/compat question

2009-01-21 Thread Linda Walsh
It's not a bug. --- It's a feature... ;-) test/[ uses -a and -o for `and' and `or'; the conditional command uses && and || for that purpose. This is they way it's documented. --- Would it be inappropriate if "[[" were to treat "-a" && "-o" identically to "&&" -a "||" so "[[" coul

Re: simple bug/compat question

2009-01-20 Thread Chet Ramey
Linda Walsh wrote: > Am running an older bash version and this may be fixed (assuming it > is a bug and I'm not confused...:-)) > > bash version = 3.2.39(20) > > This works: > 1)if [ -n "" -a 2 -gt 1 ] ; then echo one;fi > > This does not: > 2)if [[ -n "" -a 2 -gt 1 ]] ; then echo on

Re: simple bug/compat question

2009-01-19 Thread Jan Schampera
Linda Walsh wrote: > Am running an older bash version and this may be fixed (assuming it > is a bug and I'm not confused...:-)) > > bash version = 3.2.39(20) > > This works: > 1)if [ -n "" -a 2 -gt 1 ] ; then echo one;fi > > This does not: > 2)if [[ -n "" -a 2 -gt 1 ]] ; then echo on