On 4/10/23 7:02 PM, Robert Elz wrote:
     Date:        Mon, 10 Apr 2023 10:30:08 -0400
     From:        Chet Ramey <chet.ra...@case.edu>
     Message-ID:  <78038281-f431-775e-6d60-a44126d1d...@case.edu>

   | The different semantics are that the standard specifies the status of the
   | simple command in terms of the command substitution that's part of the
   | assignment statement, so you have to hang onto it for a while.

I suspect that's because you are treating the assignments (more or less)
as statements of their own, and expanding and then assigning each, one by one,
left to right as you encounter them.

No, the sentence means exactly what it says. The difference between his
example and mine is that in my example the shell has to remember the return
status of the last command substitution until the command completes.


then there is no issue, and no real need to "hang onto it for a while".

Of course you do, the standard says it's the return status of the command.

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