Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!columbia!cunixc!sethr From: sethr@cunixc.cc.columbia.edu (Seth Robertson) Newsgroups: comp.unix.questions Subject: Re: Some csh how-to, please Keywords: csh C-shell shell programming unix read Message-ID: <1352@cunixc.cc.columbia.edu> Date: 29 Mar 89 18:03:54 GMT References: <2127@pikes.Colorado.EDU> <7467@thorin.cs.unc.edu> <7485@thorin.cs.unc.edu> Reply-To: seth@ctr.columbia.edu (Seth Robertson) Organization: Columbia University: Center for Telecommunications Research Lines: 27 In article <7485@thorin.cs.unc.edu> bollella@ra.UUCP (Gregory Bollella) writes: >>In article <2127@pikes.Colorado.EDU>, pklammer@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. >> [Method deleted] >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? I don't know how to do it in csh, but the method that works for (k)sh is: #! /bin/sh exec 3<&0 < /usr/local/lib/ctrsuns while read test do echo $test rsh $test -n "$1" done exec 0<&3 3<&- This gives the error missing name for redirect. You might be able to fool around with it and get it working... -Seth seth@ctr.columbia.edu