Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16678
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: set -u not working as expected |
| Date | 2020-08-02 16:20 -0400 |
| Organization | ITS, Case Western Reserve University |
| Message-ID | <mailman.586.1596399648.2739.bug-bash@gnu.org> (permalink) |
| References | <000301d66834$588493c0$098dbb40$@kalvr.net> <8f84e805-f314-7939-a91d-eb1253e4a7b9@case.edu> |
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/
Back to gnu.bash.bug | Previous | Next | Find similar
Re: set -u not working as expected Chet Ramey <chet.ramey@case.edu> - 2020-08-02 16:20 -0400
csiph-web