Path: utzoo!attcan!uunet!lll-winken!ames!ucsd!orion.cf.uci.edu!uci-ics!bonnie.ics.uci.edu!posert From: posert@bonnie.ics.uci.edu (Bob Posert) Newsgroups: comp.unix.questions Subject: Line at a time scripts in csh Message-ID: <4116@paris.ics.uci.edu> Date: 14 Jan 89 05:01:11 GMT Sender: news@paris.ics.uci.edu Reply-To: posert@bonnie.ics.uci.edu (Bob Posert) Organization: University of California, Irvine - Dept of ICS Lines: 24 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. Then I tried the same thing, but adding quotes at the beginning and end of every line in the input file. Basically the same thing happened, even though from the prompt, foreach i ("One Two") echo $i end echoed the words on the same line. Any ideas? Thanks in advance. --Bob -- Bob Posert I'm: posert@bonnie.ics.uci.edu or {sdcsvax|ucbvax}!ucivax!bonnie!posert