Article View: comp.unix.shell
Article #1773Reading a file from withing a C-shell script
From: Wes Barris
Date: Wed, 14 Nov 1990 20:22
Date: Wed, 14 Nov 1990 20:22
27 lines
1383 bytes
1383 bytes
Suppose one has a file containing names of other files like this:
data.0001.rle
data.0020.rle
data.0025.rle
data.0085.rle
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:
#!/bin/csh -f
#
#
foreach file (my_file_list)
echo $file
process $file
end
Does anyone know how I do that?
o o o o o o o . . . ________________________________ _____=======_____
o _____ |Wes Barris | | wes@msc.edu |
.][__n_n_|DD[ ====_____ |Minnesota Supercomputer Center| |(612) 626-1854 |
>(________|__|_[_________]_|University of Minnesota_______|_|_FAX:_624-6550_|_
_/oo OOOOO oo` ooo ooo 'o^o^o o^o^o` 'o^o o^o`
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Noblemen make promises, but peasants have to keep them. -- Russian proverb
Technical Details
Message-ID:
<2945@uc.msc.umn.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!apple!agate!shelby!msi.umn.edu!noc.MR.NET!uc!uh.msc.umn.edu!wesShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!apple!agate!shelby!msi.umn.edu!noc.MR.NET!uc!uh.msc.umn.edu!wes From: wes@uh.msc.umn.edu (Wes Barris) Newsgroups: comp.unix.shell Subject: Reading a file from withing a C-shell script Message-ID: <2945@uc.msc.umn.edu> Date: 14 Nov 90 20:22:10 GMT Sender: news@uc.msc.umn.edu Reply-To: wes@msc.edu Organization: Minnesota Supercomputer Center Lines: 27