[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [doc] missing doc about :+ vs + expansion
From: |
Christophe Lyon |
Subject: |
Re: [doc] missing doc about :+ vs + expansion |
Date: |
Mon, 25 Mar 2019 14:08:47 +0100 |
On Mon, 25 Mar 2019 at 14:03, Andreas Kusalananda Kähäri
<andreas.kahari@abc.se> wrote:
>
> On Mon, Mar 25, 2019 at 11:19:08AM +0100, Christophe Lyon wrote:
> > Hi,
> >
> > I think I've noticed a bit of explanation missing in the documentation
> > about parameter expansion.
> >
> > bash supports :+ and + expansion, but 'man bash' describes the former only.
> > This is also true for the similar expansions (:-, :=, :?)
> >
> > Some documentation is available at:
> > http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02
> > and
> > https://www.tldp.org/LDP/abs/html/parameter-substitution.html
> >
> > Thanks,
> >
> > Christophe
>
> It is not omitted. The paragraph before the list of parameters
> expansions in the manual reads
>
> 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.
>
Hmmm right, I managed to miss it, despite read that part of the doc
several times.
Sorry for the noise.
> Regards,
>
> --
> Andreas Kusalananda Kähäri,
> National Bioinformatics Infrastructure Sweden (NBIS),
> Uppsala University, Sweden.