On 12/30/22 4:23 AM, Robert Elz wrote:
For what it is worth, I tested a bunch of shells with the original expressions, all ksh variants, bosh, and bash evaluate the original expressions the bash way, all ash variants, plus yash and zsh implement it the dash way. Neither is incorrect.
It really comes down to when you fetch the value on the lhs. Do you save the variable name and fetch its value after you evaluate the rhs, or do you get the lhs value at the same time you save the name? -- ``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/