From owner-freebsd-hackers Mon Mar 6 9:11:33 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 5E31D37BDEA for ; Mon, 6 Mar 2000 09:11:22 -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 MAA22862; Mon, 6 Mar 2000 12:11:03 -0500 (EST) (from chet) Date: Mon, 6 Mar 2000 12:09:02 -0500 From: Chet Ramey To: jhix@mindspring.com Subject: Re: empty lists in for Cc: Doug@gorean.org, hackers@FreeBSD.ORG Reply-To: chet@po.CWRU.Edu Message-ID: <1000306170902.AA22857.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 jhix@mindspring.com of Sun, 05 Mar 2000 20:41:15 -0800 (id <20000305204115E.jhix@mindspring.com>) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Even though it's my preferred shell, I certainly wouldn't say > that Bash is any sort of standard, certainly not in the POSIX > sense. Bash implements the POSIX.2 standard, with certain well-defined exceptions (`posix mode'). > Imagine processing a possibly empty list constructed from a > 'make' expansion... Without this behavior one would have to > code a guard of some sort around the 'for' construct. The idiomatic solution for this sort of thing is changing your makefile recipes from for f in ${SUBDIRS} do ... to sh_subdirs=${SUBDIRS}; for f in $$sh_subdirs ; do ... -- ``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