10 Ocak 2021 Pazar tarihinde Chet Ramey <chet.ra...@case.edu> yazdı:

> So you have got (( assoc[x],b[$(uname >&2)] )), and the shell does exactly
> what you think it does with that.
>
> This is a valid arithmetic expression. The `assoc' is marked as having its
> subscript expanded once, since it has. The `b' is not, because it has not.
> So when the arithmetic evaluator gets `b[$(uname >&2)]', it expands the
> subscript.
>
> The shell could internally quote the subscript, but it doesn't do that
> right now.


If I don't know the key beforehand, like if I read it from a file or the
like, this becomes a security issue. That is my concern,
`assoc_expand_once' doesn't help in that situation.


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


-- 
Oğuz

Reply via email to