bug-bash
[Top][All Lists]
Advanced

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

Re: Undocumented behaviour - parameter expansion ${par-word}


From: Clark WANG
Subject: Re: Undocumented behaviour - parameter expansion ${par-word}
Date: Tue, 4 Sep 2012 19:19:02 +0800

On Tue, Sep 4, 2012 at 7:13 PM, Roman Rakus <rrakus@redhat.com> wrote:

> Hi,
> Petr, adding to cc: list, found behaviour not documented, neither in man
> page nor bash ref manual:
> ${par-word} will do expansion of par, and if the par is unset it is
> substituted by word. It is different from ${par:-word}, where word is used
> when par is unset or null.
>
> Is it undocumented and deprecated, like $[]? Or just undocumented?
>

>From man page:

       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.


>
> RR
>
>


reply via email to

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