On 05/04/2023 16:25, Oğuz via austin-group-l at The Open Group wrote:
5 Nisan 2023 Çarşamba tarihinde Chet Ramey via austin-group-l at The
Open Group <austin-group-l@opengroup.org
<mailto:austin-group-l@opengroup.org>> yazdı:
but should it
be set fron the command substitution for the assignment to c?
I think it'd be practical, is there a reason why it shouldn't? And while
we're at it, is there a reason why assignments in a simple command
shouldn't be applied sequentially, from left to right? Most shells
already do it that way; that is,
a=1 b=$a c=$b
echo $a $b $c
prints `1 1 1' in them. Outliers are ash based shells; they apply
assignments concurrently but it isn't useful at all.
Note that in dash, this only applies to older versions. dash 0.5.7
(released in 2011) and higher print "1 1 1" like almost all other
shells, and other dash-derived shells (busybox ash, and my own) keep it
that way.
I am not sure which other ash based shells you were looking at, but it
may be worth making sure you are on a current version.
Cheers,
Harald van Dijk