Date: Tue, 7 Mar 2000 15:28:05 +0600 (NS) From: Max Khon <fjoe@iclub.nsu.ru> To: chet@po.CWRU.Edu Cc: iedowse@maths.tcd.ie, imp@village.org, jhix@mindspring.com, Doug@gorean.org, hackers@FreeBSD.ORG Subject: Re: empty lists in for Message-ID: <Pine.BSF.4.21.0003071526590.49865-100000@iclub.nsu.ru> In-Reply-To: <1000306221330.AA36812.SM@nike.ins.cwru.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
hi, there! On Mon, 6 Mar 2000, Chet Ramey wrote: > > >: to > > >: > > >: sh_subdirs=${SUBDIRS}; for f in $$sh_subdirs ; do ... > > > > > > > >there's lots of other workarounds, from seeing if SUBDIRS is defined, > > >to using make's .foreach. > > > > Another option is: > > > > for f in $$empty_list ${SUBDIRS}; do ... > > > > where 'empty_list' is any undefined sh variable. > > Not bad, but will break if the shell is run with the `-u' option on > for some reason. man 1 sh: -u nounset Write a message to standard error when attempting to expand a variable that is not set, and if the shell is not interactive, exit immediately. (UNIMPLEMENTED) ^^^^^^^^^^^^^ :) /fjoe 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?Pine.BSF.4.21.0003071526590.49865-100000>