On Fri, Dec 10, 2010 at 04:27, Braun Brelin <bbrelin at gmail.com> wrote:
> After some experimentation, it seems that if I escape the parentheses, bash
> does the right
> thing. However, does anyone know if this is also true for original Bourne
> shell?
[...]
> test \( expr1 -o expr2 \) -a expr3
I think that works in the original shell. Not sure about the original
test however. Can't remember if it always supported parens or the
-o/-a operators. This will run on older systems
test expr1 || test expr2 && test expr3
would work as you expect and the precedence rules would do what you want here.
Kevin
>> Thanks,
>> Braun
> --
> Irish Linux Users' Group mailing list
> About this list : http://mail.linux.ie/mailman/listinfo/ilug> Who we are : http://www.linux.ie/> Where we are : http://www.linux.ie/map/>
--
Kevin Lyda
Dublin, Ireland
US Citizen overseas? We can vote.
Register now: http://www.votefromabroad.org/
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!