Path: utzoo!attcan!uunet!mcvax!hp4nl!botter!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.unix.questions Subject: Re: Line at a time scripts in csh Message-ID: <1902@koto.cs.vu.nl> Date: 14 Jan 89 12:38:52 GMT References: <4116@paris.ics.uci.edu> Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 16 posert@bonnie.ics.uci.edu (Bob Posert) writes: \I have a file with two words on each line, and want to \process them in a shell script, but can't figure out \how to get *the entire line* into a variable. \I tried: \ foreach i (`cat file`) \ #misc processing \ end \but i was set to each word, not line. foreach i ("`cat file`") # create 1 string ..."$i"... # avoid * and friends getting expanded end -- Lee Harvey Oswald was a patsy. |Maarten Litmaath @ VU Amsterdam: Or a superman. |maart@cs.vu.nl, mcvax!botter!maart