[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Document weird bug of Solaris /bin/sh w.r.t. for loops
From: |
Stefano Lattarini |
Subject: |
Document weird bug of Solaris /bin/sh w.r.t. for loops |
Date: |
Thu, 1 Jul 2010 13:42:26 +0200 |
User-agent: |
KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.4; i686; ; ) |
Hello autoconfers.
Is anyone aware of the following bug of Solaris /bin/sh w.r.t. for
loops? I couldn't find any mention of it in the Autoconf manual, and
I think that a proper description of the bug could be an useful
addition for the manual.
On Solaris 10:
$ /bin/sh -c 'for a in b=c; do echo "$a"; done'
Unexpectedly, nothing is written on stdout!
Similarly:
$ /bin/sh -c 'for a in b=c x; do echo "$a"; done'
x
and again the string "b=c" is not written.
On the other hand:
$ /usr/xpg4/bin/sh -c 'for a in b=c; do echo "$a"; done'
b=c
$ /bin/sh -c 'for a in "b=c"; do echo "$a"; done'
b=c
$ /bin/sh -c 'x="b=c"; for a in $x; do echo "$a"; done'
b=c
$ /bin/sh -c 'for a in x b=c; do echo "$a"; done'
x
b=c
WDYT?
More info about the Solaris system I run the previous tests on:
SunOS 5.10 Generic_141445-09 i86pc i386 i86pc
Regards,
Stefano
- Document weird bug of Solaris /bin/sh w.r.t. for loops,
Stefano Lattarini <=