[Top][All Lists]

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

Re: ${param+x} ?

From: Davide Brini
Subject: Re: ${param+x} ?
Date: Tue, 19 Dec 2023 12:03:06 +0100

On Tue, 19 Dec 2023 11:38:50 +0100, lacsaP Patatetom <>

> this form `${param+x}` is not documented (man) but is accepted by bash and
> differs from `${param:+x}` :

It IS documented:

When not  performing  substring  expansion,  using the forms documented
below (e.g., :-), bash tests for a parameter that is unset or null.
Omitting the colon results in a test only for a parameter that is unset.


reply via email to

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