On 6/29/25 10:13 AM, Stan Marsh wrote:

I always thought the "colon-free" versions of the P.E. was a bash-ism, but
experimentation shows that it works in "dash" as well.  And "man dash" contains
the following text:

    In the parameter expansions shown previously, use of the colon in the 
format re-
      sults in a test for a parameter that is unset or null; omission of the 
colon re-
      sults in a test for a parameter that is only unset.

So, is this POSIX, or just a dash-extension?

The POSIX standard is freely available

https://pubs.opengroup.org/onlinepubs/9799919799/nfindex.html

and would answer your question.

https://pubs.opengroup.org/onlinepubs/9799919799/utilities/V3_chap02.html#tag_19_06_02

--
``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