On 8/2/20 4:01 AM, Oğuz wrote:
> $ set -u
> $ unset foo bar
> $ typeset -i foo bar
> $
> $ foo+=foo+1
> $
> $ foo+=bar+1
> bash: bar: unbound variable
>
> Only referencing `bar' triggers the _unbound variable_ error, it makes
> sense that the name being assigned is immune to that.
You could make a decent case that this is a bug in bash, I suppose, but
I am comfortable with the current behavior.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/