On 1/3/22 6:02 PM, Ángel wrote:
Or, an even simpler one (assuming a utf-8 locale, like almost everyone uses
these days):
$ printf "%511s\xc3\xa4" | ./bash -c 'a="$(echo a)"; d=$(cat); echo "$d"' | sed
's/^ *//'
Ö�
where it should have output:
ä
Even with this reproducer, I was unable to get
It appears that the same initialized nameref variable may refer to variables in
different scopes depending on the context where it is used. When used in an
assignment, a nameref will look for the variable it references starting at the
scope where the nameref itself was found, which may be below