From owner-freebsd-hackers Mon Mar 6 10:46:32 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from server.baldwin.cx (jobaldwi.campus.vt.edu [198.82.67.146]) by hub.freebsd.org (Postfix) with ESMTP id 964D937BF84 for ; Mon, 6 Mar 2000 10:46:19 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from john.baldwin.cx (john [10.0.0.2]) by server.baldwin.cx (8.9.3/8.9.3) with ESMTP id NAA02386; Mon, 6 Mar 2000 13:45:44 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-Id: <200003061845.NAA02386@server.baldwin.cx> X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <38C3737B.63ACC551@gorean.org> Date: Mon, 06 Mar 2000 13:45:44 -0500 (EST) From: John Baldwin To: Doug Barton Subject: Re: empty lists in for Cc: hackers@FreeBSD.org, Max Khon , Sheldon Hearn Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 06-Mar-00 Doug Barton wrote: > I just checked POSIX 1003.2. > > for name [ in word ] > do > compound-list > done > > the "in word" is optional. Therefore: > > for name in ; do echo $name; done > > is an error, whereas > > for name ; do echo $name; done These are two different functions. The second one loops through the command line parameters. > is not, and Bash does not report it as so, in or out of POSIX mode. > Also, your snippet clearly expects that there will be a word after "in." > It could easily be argued from that context that the presence of "in" > without a "word" to go with it is an error, even without the bit from > Martin's post. > > All that said, if the ports make system depends on the current > behavior, it has to be fixed before we can contemplate any changes. Patches accepted. > Doug -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message