Re: [Help-bash] What is the difference between ${input:+x} and ${input+x
From:
Davide Brini
Subject:
Re: [Help-bash] What is the difference between ${input:+x} and ${input+x}?
Date:
Sun, 23 Sep 2012 23:23:16 +0200
On Sun, 23 Sep 2012 15:49:29 -0500, Peng Yu <address@hidden> wrote:
> Hi,
>
> The usages of ${input:+x} and ${input+x} seem to be the same. But I
> don't see the document for ${input+x}. Could anybody let me know where
> it is? Is there any subtle difference between ${input:+x} and
> ${input+x}? Thanks!
"When not performing substring expansion, using the forms documented below,
bash tests for a parameter that is unset or null. Omitting the colon
results in a test only for a parameter that is unset."
--
D.