Line at a time scripts in csh

Bob Posert posert at bonnie.ics.uci.edu
Sat Jan 14 15:01:11 AEST 1989


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 at bonnie.ics.uci.edu or {sdcsvax|ucbvax}!ucivax!bonnie!posert 



More information about the Comp.unix.questions mailing list