Bug#267142: huh?
On Fri, Sep 10, 2004 at 09:49:34PM -0700, Thomas Bushnell BSG wrote:
> But my first reaction to the issue here is to simply depend on bash.
> If I were to fix the bug in question, I would not alter my use of test
> to comply with some foolish idea about what "looks better". To me, -a
> looks better, because -a is typical for command arguments and "&&" is
> not. "&&" looks like a freaky backgrounding command to me. And in
> Version 7 Unix, -a was the only option, so it's really "&&" that is
> the freaky novelty. To my eye, at least.
&& was perfectly well-supported in the v7 Unix shell. Of course it isn't
typical for command arguments; that's because it isn't a command
argument, but an operator for joining two pipelines together.
$ unix-v7
PDP-11 simulator V3.2-2
Disabling XQ
@boot
New Boot, known devices are hp ht rk rl rp tm vt
: rl(0,0)rl2unix
mem = 177856
# test -d bin; echo $?
0
# test -d nonexistent; echo $?
1
# test -d usr; echo $?
0
# test -d bin -a -d usr; echo $?
0
# test -d bin && test -d usr; echo $?
0
# test -d bin -a -d nonexistent; echo $?
1
# test -d bin && test -d nonexistent; echo $?
1
#
The Autoconf manual refers (Portable Shell / Limitations of Builtins) to
precedence problems on System V as the rationale for avoiding -a and -o.
I don't see how you can logically use the behaviour of Version 7 Unix as
justification for anything while overlooking System V.
Cheers,
--
Colin Watson [cjwatson@debian.org]
Reply to: