Peter,
At 2000/12/14/12:19 +0200 Peter Pentchev <[EMAIL PROTECTED]> wrote:
> Just a side note - is there a reason you could not use the standard '['
> test operator? Along with some quoting of possibly-null arguments, of
> course.. something like:
>
> [ -n "$1" ] && muttrc="$1"
>
> [ ! -e "$muttrc" ] && die "$muttrc: no such file"
> [ ! -f "$muttrc" ] && die "$muttrc: not regular file"
> [ ! -r "$muttrc" ] && die "$muttrc: cannot open"
Of course, this would be O.K. I prefer the [[ ]] operator (found in
ksh and bash 2.x) because it is smarter and more resistant to syntax
errors that occur with [ ] if a variable is undefined. But
certainly one can use [ ] and then double quote the variables
within, as you have done.
> Just this way, it works for me in FreeBSD's /bin/sh, which is pretty much
> as standard a Bourne shell as you can get..
FreeBSD doesn't come with bash? (Maybe I should have used perl. :-)
> --
> This inert sentence is my body, but my soul is alive, dancing in the sparks of your
>brain.
Cool .sig. :-)
David
--
Live in a world of your own, but always welcome visitors.