Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Mar 2000 02:32:57 -0700
From:      Warner Losh <imp@village.org>
To:        Sheldon Hearn <sheldonh@uunet.co.za>
Cc:        Doug Barton <Doug@gorean.org>, Max Khon <fjoe@iclub.nsu.ru>, hackers@FreeBSD.ORG
Subject:   Re: empty lists in for 
Message-ID:  <200003060932.CAA57921@harmony.village.org>
In-Reply-To: Your message of "Mon, 06 Mar 2000 11:15:14 %2B0200." <34889.952334114@axl.ops.uunet.co.za> 
References:  <34889.952334114@axl.ops.uunet.co.za>  

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003060932.CAA57921>