On Wed, Jan 20, 2021 at 6:44 PM Chet Ramey <chet.ra...@case.edu> wrote:

> Thanks for the report. It's probably not what you intend, but it's the way
> bash has done things all the way back to bash-4.0 when the additional
> variable attributes were introduced (and further back if you consider the
> integer attribute).


> The way bash does it is that the word is expanded (to `X') and that value
> is assigned to a. That becomes the value of the expansion. The conversion
> is then performed, at a lower layer, on the assignment.
>
> This should only affect this particular parameter expansion involving
> variables where this kind of conversion takes place at assignment time. I
> think it would be reasonable to change the result to the final value of
> the variable for the next version and make the new behavior dependent on
> the shell compatibility level.
>

I agree. Thanks


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

Reply via email to