Some csh how-to, please
Gregory Bollella
bollella at ra.cs.unc.edu
Wed Mar 29 22:58:48 AEST 1989
In article <7467 at thorin.cs.unc.edu> white at white.cs.unc.edu (Brian T. White) writes:
>In article <2127 at pikes.Colorado.EDU>, pklammer at pikes.Colorado.EDU (Peter Klammer) writes:
>> Could someone please tell me how to read a file line at a time
>> into the C shell? Better yet, can you refer me to any good C-shell
>> text.
>
>Try "The UNIX C Shell Field Guide" by Anderson and Anderson. To read
>a file one line at a time, try
>
>foreach p ( "`cat file`" )
> set line=`echo $p`
> (commands acting on $line)
>end
I tried the above on a large file and it did not work. csh reported
Too many words from ``.
The file was 118583 bytes. Does anybody have any ideas on how to
get around this limit and still get one line at a time?
Gregory Bolella bollella at cs.unc.edu
Department of Computer Science
CB# 3175 Sitterson Hall
University of North Carolina
Chapel Hill, NC 27599-3175
More information about the Comp.unix.questions
mailing list