[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: manual page missing ${parameter-replacement}
From: |
Lawrence Velázquez |
Subject: |
Re: manual page missing ${parameter-replacement} |
Date: |
Mon, 21 Nov 2022 02:49:41 -0500 |
User-agent: |
Cyrus-JMAP/3.7.0-alpha0-1115-g8b801eadce-fm-20221102.001-g8b801ead |
On Mon, Nov 21, 2022, at 2:20 AM, Ulrich Windl wrote:
> I think the bash manual page lacks some important detail of parameter
> substitution, namely:
> "Bash tests for a parameter that is unset or null. Omitting the colon
> results in a test only for a parameter that is unset."
>
> (found in
> https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html)
You omitted all of the relevant context. The full paragraph is:
When not performing substring expansion, using the form [sic]
described 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. Put another way,
if the colon is included, the operator tests for both
_parameter_'s existence and that its value is not null; if
the colon is omitted, the operator tests only for existence.
The manual then goes on to describe the ${parameter:-word},
${parameter:=word}, ${parameter:?word}, and ${parameter:+word}
forms. These are what your excerpt is talking about.
So what do you think is missing, exactly?
--
vq