bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set -u not working as expected


From: Chet Ramey
Subject: Re: set -u not working as expected
Date: Sun, 2 Aug 2020 16:20:40 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 8/1/20 2:48 PM, Kristof Burek wrote:

> Bash Version: 5.0
> Patch Level: 3
> Release Status: release
> 
> (Machine is a Raspberry Pi running Raspbian "Buster")
> 
> Description:
>         After set -u in a script: when x has not yet been bound to a value, 
>         I would expect the statements x+='x' and x+=('x') to cause Bash to
>         report an error and exit the script.  But it does not.

This does not fall under the `expand an unset parameter' scope where the
`-u' option is active.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]