[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Paul Eggert
Subject: Re: [PATCH] Replace 'test "${var+set}" = set' with 'test -n "${var+set}"'
Date: Wed, 08 Apr 2015 23:49:54 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]