From owner-freebsd-hackers Mon Mar 6 1:33:10 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 8317137BCCA for ; Mon, 6 Mar 2000 01:33:06 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id CAA53235; Mon, 6 Mar 2000 02:33:04 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id CAA57921; Mon, 6 Mar 2000 02:32:57 -0700 (MST) Message-Id: <200003060932.CAA57921@harmony.village.org> To: Sheldon Hearn Subject: Re: empty lists in for Cc: Doug Barton , Max Khon , hackers@FreeBSD.ORG In-reply-to: Your message of "Mon, 06 Mar 2000 11:15:14 +0200." <34889.952334114@axl.ops.uunet.co.za> References: <34889.952334114@axl.ops.uunet.co.za> Date: Mon, 06 Mar 2000 02:32:57 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <34889.952334114@axl.ops.uunet.co.za> Sheldon Hearn writes: : On Mon, 06 Mar 2000 00:59:39 PST, Doug Barton wrote: : : > for name [ in word ] : > do : > compound-list : > done : > : > the "in word" is optional. Therefore: : : Hmmm, you're right. : : I must admit, though, that if the text is confusing enough to confuse : me, it's not entirely clear (even if I'm not the hardest person in the : world to confuse)! Are you sure that "word" here means one or more tokens, or zero or more tokens. If it means zero or more tokens, then 'for i in ; do ' is perfectly legal. You're not quoting what word means. The reason that I ask this is that I can't see why for i in ; do would be any different than for i in $foo; do when foo is empty. They are the same thing from at last my world view of the shell. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message