On 2/6/25 5:26 AM, Alexis Reynouard wrote:
Hello,

This concern:
https://www.gnu.org/software/bash/manual/bash.html#Shell-Parameter-Expansion

In the bash documentation, section “shell parameter expansion,” in the
paragraph “${parameter:-word},” the example given uses
    ${parameter-word}
which is a Bourne Shell compatible expansion but behaves differently
for defined but empty parameters. For greater clarity, shouldn't we
write the following documentation (Please excuse the RST syntax):

This is the paragraph immediately before the part you quoted:

"When not performing substring expansion, using the form 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 lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to