[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [doc] missing doc about :+ vs + expansion
From: |
Andreas Kusalananda Kähäri |
Subject: |
Re: [doc] missing doc about :+ vs + expansion |
Date: |
Mon, 25 Mar 2019 14:03:02 +0100 |
User-agent: |
Mutt/1.11.4 (2019-03-13) |
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.
Regards,
--
Andreas Kusalananda Kähäri,
National Bioinformatics Infrastructure Sweden (NBIS),
Uppsala University, Sweden.