gripes about /bin/sh AND /bin/csh

Doug Gwyn gwyn at brl-smoke.ARPA
Wed Jun 18 02:01:00 AEST 1986


In article <44 at houligan.UUCP> dave at smaug.UUCP (Dave Cornutt) writes:
-What Phil wants (me too) is some capability to open a file in a sh/csh
-script and read a line at a time into a variable, like this:
-	open <some-file> xyz
-	while ( ! eof(xyz) )
-		read xyz $line_from_file
-		<...do stuff with data...>
-	end
-	close xyz
-Neither sh nor has any such capability.

while line_from_file=`line`
do	... do stuff with $line_from_file ...
done < some-file



More information about the Comp.unix mailing list