On Sat, 04 Mar 2000 15:36:43 +0200, Sheldon Hearn wrote:
> I seem to remember POSIX being ambiguous on this one, but my books
> are at the office. If you haven't gotten a more conclusive answer by
> Monday, mail me and I'll look it up.
I was wrong about POSIX being ambiguous in this regard; it's SUSV2 which
is ambiguous. From POSIX.2 3.9.4.2:
First, the list of words following _in_ shall be expanded to
generate a list of items. Then, the variable <name> shall be
set to each item, in turn, and the <compound-list> executed each
time. If no items result from the expansion, the
<compound-list> shall not be executed. [...]
Exit Status: The exit status of a _for_ command shall be the
exit status of the last command that executes. If there are no
items, the exit status shall be zero.
> Neither bash nor ksh claim to be particularly POSIX compliant. our
> /bin/sh does.
This is the part of my original post that Doug barton objected to.
Perhaps bash has POSIX compliance as one of its goals, which invalidates
my original statement. On this score, however, both bash and ksh are
not compliant.
Once again, our shell comes out tops. :-)
Ciao,
Sheldong.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message