Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!usc!apple!voder!pyramid!infmx!dberg From: dberg@informix.com (David I. Berg) Newsgroups: comp.unix.shell Subject: Re: Reading a file from withing a C-shell script Message-ID: <1990Nov15.203804.14841@informix.com> Date: 15 Nov 90 20:38:04 GMT References: <2945@uc.msc.umn.edu> Sender: news@informix.com (Usenet News) Organization: Informix Software, Inc. Lines: 18 In article <2945@uc.msc.umn.edu> wes@msc.edu writes: >Suppose one has a file containing names of other files ....... >.......... >From a C-shell script, I would like to, one-by-one, get the names out >of this data file and do something with them like this: > >............ >foreach file (my_file_list) > echo $file > process $file >end > >Does anyone know how I do that? foreach file (`cat my_file_list`) echo $file process $file end