I believe this comes from "performed from the beginning of the command text 
 to the end", L75487. The save of Step 1. and evaluations as Step 3. or 4. 
are  expected to maintain that begin to end order.
a=a; b=$a a=x cmd;
would then have b=a and a=x when cmd executed.
 
 
In a message dated 6/16/2017 12:39:19 P.M. Eastern Daylight Time,  
joerg.schill...@fokus.fraunhofer.de writes:

Stephane  CHAZELAS <stephane.chaze...@gmail.com> wrote:

> 2017-06-16  16:19:27 +0000, Austin Group Bug Tracker:
> [...]
> >  In
> >         a=a; a=x b=$a
> > it  is explicitly unspecified whether b=a or b=x at
> > the  conclusion.  It would be astounding if there was
> > to be a  stricter requirement for $?
> [...]
>
> Is it really?  
>
> I do remember it was discussed some time ago and the outcome  was
> that $b should be x. It was reported to "dash" (as a POSIX
>  conformance bug) and despite initial reticence, dash was changed
> so as  to perform assignments left to right (as anybody would
>  expect).

The historic Bourne Shell made a list of macro assignments be  executed 
right to 
left which is against common sense.

I am not sure  whether POSIX requires a specific order. I changed the 
execution 
order in  bosh to be left to right long ago.

Jörg

--  
EMail:jo...@schily.net               (home) Jörg Schilling D-13353 Berlin
joerg.schill...@fokus.fraunhofer.de (work) Blog:  
http://schily.blogspot.com/
URL: http://cdrecord.org/private/  
http://sf.net/projects/schilytools/files/'


Reply via email to