Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-spam!nike!ucbcad!ucbvax!sdcsvax!noscvax!cod!dberg From: dberg@cod.UUCP (David I. Berg) Newsgroups: net.unix Subject: Re: zero-trip foreach loops Message-ID: <188@cod.UUCP> Date: Tue, 21-Oct-86 18:07:47 EDT Article-I.D.: cod.188 Posted: Tue Oct 21 18:07:47 1986 Date-Received: Wed, 22-Oct-86 22:17:04 EDT References: <2494@utai.UUCP> Organization: Naval Ocean Systems Center, San Diego Lines: 26 In article <2494@utai.UUCP>, lamy@utai.UUCP (Jean-Francois Lamy) writes: > > Is there an easy way to have csh foreach loops that don't complain if the > pattern given does not match any file...., > You might try: touch dummy.tfm foreach font (*.tfm) if $font = "dummy.dfm" continue set fontname = `basename $font .tfm` foreach size ($fontname.*pxl) ... end end rm dummy.tfm -- David I. Berg (dberg) Advanced Technology, Inc. San Diego, CA MILNET: dberg@nosc UUCP: {ihnp4 akgua decvax dcdwest ucbvax}!sdcsvax!noscvax!dberg