Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!nosc!cod!dberg From: dberg@cod.NOSC.MIL (David I. Berg) Newsgroups: comp.unix.questions Subject: Re: Line at a time scripts in csh Message-ID: <1371@cod.NOSC.MIL> Date: 23 Jan 89 17:58:33 GMT References: <4116@paris.ics.uci.edu> <909@ubu.warwick.UUCP> Organization: Naval Ocean Systems Center, San Diego Lines: 22 In article <909@ubu.warwick.UUCP>, geoff@warwick.UUCP (Geoff Rimmer) writes: > In article <4116@paris.ics.uci.edu> posert@bonnie.ics.uci.edu (Bob Posert) writes: > > foreach i (`cat file`) > > #misc processing > > end > >but i was set to each word, not line. When I encountered the same problem I used an oscillating soft switch to keep track of which word to which I was was pointing. It's a kludge, but it works. > However, when I tried this just now, I realised that if there are any wild > cards (?,*,[,]) then it gives the strange error message "end: No match" Set the environment variable "nonomatch" to eliminate no matches. -- David I. Berg (dberg@nosc.mil) GENISYS Information Systems, Inc., 4250 Pacific Hwy #118, San Diego, CA 92110 MILNET: dberg@nosc.mil UUCP: {akgua decvax dcdwest ucbvax}!sdcsvax!noscvax!dberg