'c' shell scripts - (nf)
olson at fortune.UUCP
olson at fortune.UUCP
Fri Dec 23 10:08:38 AEST 1983
#R:sri-arpa:-1450400:fortune:26900010:000:659
fortune!olson Dec 22 13:14:00 1983
While Jeff Bernardis' solution (to the problem of reading sequential
lines from a file in a csh script) is quite nice, it is a solution
for the BOURNE shell, NOT the csh. The original question asked
how to do it for the csh. The equivalent of read is $<, but
that reads from the standard input of the entire while loop,
so the redirect is no good (see note in next para).
The old equivalent was gets, (which wasn't a builtin), but even that
is no good, since the csh does not allow you to redirect the input
for a 'here' document, unlike the bourne shell. Hence the
convolutions posted here to accomplish the required task.
Dave Olson, Fortune Systems
More information about the Comp.unix
mailing list