2017-05-24 17:15:25 +0200, Joerg Schilling: > Stephane CHAZELAS <stephane.chaze...@gmail.com> wrote: [...] > > $ a=1 ./sh -o posix -c 'a=2; printenv a' > > 1 > > > > POSIX requires 2 to be output there (assuming printenv a command > > to print the value of a given environment variable). > > Do you have a pointer to the related text? [...]
http://pubs.opengroup.org/onlinepubs/9699919799.2016edition/utilities/V3_chap02.html#tag_18_05_03 http://pubs.opengroup.org/onlinepubs/9699919799.2016edition/basedefs/V1_chap08.html#tag_08 See also http://pubs.opengroup.org/onlinepubs/9699919799.2016edition/utilities/V3_chap02.html#tag_18_09_01 for a consideration about environment variables whose name are invalid shell variable names (or at least that were invalid at the time the shell started). -- Stephane