On 4/1/20 1:21 PM, Krystian Wojtas wrote:
> Aha, already known. Thank you for link. I'll get familiar with other cases.
>
> I just figured out that it works as expected if local variable is firstly
> declared and then set.
That's because the exit status of a command consisting only of assignment
statements is special-cased to be the exit status of the last command
substitution to occur while processing the assignments.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/