Re: [PATCH] Replace 'test "${var+set}" = set' with 'test -n "${var+set}"'

Paul Eggert <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches
Organization UCLA Computer Science Department
Message-ID <[email protected]>
Eric Blake wrote:
> test ${var+y}

Hah!  Here's something that's one byte shorter:

${var+:} [ ]

It may be clearer to write it more in the style you used:

[ ${var+y} ]

Both of these work with Solaris 10 /bin/sh.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.