From owner-freebsd-hackers Mon Mar 6 0:44: 1 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from axl.ops.uunet.co.za (axl.ops.uunet.co.za [196.31.1.175]) by hub.freebsd.org (Postfix) with ESMTP id D2CAB37BCB1 for ; Mon, 6 Mar 2000 00:43:54 -0800 (PST) (envelope-from sheldonh@axl.ops.uunet.co.za) Received: from sheldonh (helo=axl.ops.uunet.co.za) by axl.ops.uunet.co.za with local-esmtp (Exim 3.13 #1) id 12Rt4d-0008gg-00; Mon, 06 Mar 2000 10:41:07 +0200 From: Sheldon Hearn To: Max Khon , Doug Barton Cc: hackers@FreeBSD.ORG Subject: Re: empty lists in for In-reply-to: Your message of "Sat, 04 Mar 2000 15:36:43 +0200." <57223.952177003@axl.ops.uunet.co.za> Date: Mon, 06 Mar 2000 10:41:07 +0200 Message-ID: <33397.952332067@axl.ops.uunet.co.za> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 shall be set to each item, in turn, and the executed each time. If no items result from the expansion, the 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