From owner-freebsd-hackers Mon Mar 6 9:16:40 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from nike.ins.cwru.edu (nike.INS.CWRU.Edu [129.22.8.219]) by hub.freebsd.org (Postfix) with ESMTP id 353E637BE34 for ; Mon, 6 Mar 2000 09:16:37 -0800 (PST) (envelope-from chet@nike.ins.cwru.edu) Received: (chet@localhost) by nike.ins.cwru.edu (8.9.3/CWRU-2.5-bsdi) id MAA22877; Mon, 6 Mar 2000 12:15:08 -0500 (EST) (from chet) Date: Mon, 6 Mar 2000 12:12:03 -0500 From: Chet Ramey To: imp@village.org Subject: Re: empty lists in for Cc: sheldonh@uunet.co.za, Doug@gorean.org, fjoe@iclub.nsu.ru, hackers@FreeBSD.ORG Reply-To: chet@po.CWRU.Edu Message-ID: <1000306171203.AA22870.SM@nike.ins.cwru.edu> Read-Receipt-To: chet@po.CWRU.Edu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-In-Reply-To: Message from imp@village.org of Mon, 06 Mar 2000 02:32:57 -0700 (id <200003060932.CAA57921@harmony.village.org>) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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 standard says that `word' may not be the empty string. POSIX.2, 3.10. > 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. Because parsing and expansion are different things, and expansion is performed after a command has been completely parsed. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ( ``Discere est Dolere'' -- chet) Chet Ramey, CWRU chet@po.CWRU.Edu http://cnswww.cns.cwru.edu/~chet/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message