Date: Mon, 06 Mar 2000 10:41:07 +0200 From: Sheldon Hearn <sheldonh@uunet.co.za> To: Max Khon <fjoe@iclub.nsu.ru>, Doug Barton <Doug@gorean.org> Cc: hackers@FreeBSD.ORG Subject: Re: empty lists in for Message-ID: <33397.952332067@axl.ops.uunet.co.za> In-Reply-To: Your message of "Sat, 04 Mar 2000 15:36:43 %2B0200." <57223.952177003@axl.ops.uunet.co.za>
next in thread | previous in thread | raw e-mail | index | archive | help
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 majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?33397.952332067>