[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash builtin test changes in 2.04
From: |
Chet Ramey |
Subject: |
Re: bash builtin test changes in 2.04 |
Date: |
Mon, 9 Oct 2000 10:50:56 -0400 |
> There seems to have been a change in teh behaviour of the bash builtin
> test or [
> In particular, the ( EXPRESSION ) syntax seems to have changed so that
> [ ! ( -z "$USER" -o -z $PS1 ) ]
> gives and error when it worked in 2.03. It forthermore works for the gnu
> /usr/bin/test. Has tehre been a change and why?
First, you need to quote the `(' and `)' so the shell parser doesn't
grab them. Then, you need to quote the $PS1, so, if it's null, the
`)' is not taken as the argument to -z.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)
Chet Ramey, CWRU chet@po.CWRU.Edu http://cnswww.cns.cwru.edu/~chet/