Date: Mon, 6 Mar 2000 12:12:03 -0500 From: Chet Ramey <chet@nike.ins.cwru.edu> To: imp@village.org Cc: sheldonh@uunet.co.za, Doug@gorean.org, fjoe@iclub.nsu.ru, hackers@FreeBSD.ORG Subject: Re: empty lists in for Message-ID: <1000306171203.AA22870.SM@nike.ins.cwru.edu>
next in thread | raw e-mail | index | archive | help
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1000306171203.AA22870.SM>