On Wed, Sep 10, 2003 at 12:32:32PM +1000, Herbert Xu wrote:
> Branden Robinson <branden@debian.org> wrote:
> >
> > I do continue to think that:
> >
> > if [ -n "$var" ]
> >
> > is more readable than
> >
> > if [ "${var+set}" = "set" ]
>
> These two constructs will yield different results when var is set but
> empty.
I wasn't saying that they were identical. I read the "Parameter
Expansion" section of the ash(1) manpage all the time.
I was saying that the latter is less readable. Meaning it looks more
like Perl. Meaning it's more of an abomination in my eyes. :-P
--
G. Branden Robinson | You could wire up a dead rat to a
Debian GNU/Linux | DIMM socket and the PC BIOS memory
branden@debian.org | test would pass it just fine.
http://people.debian.org/~branden/ | -- Ethan Benson
Attachment:
pgp7Cjj9fNtMh.pgp
Description: PGP signature