Reading a file from withing a C-shell script
David I. Berg
dberg at informix.com
Fri Nov 16 07:38:04 AEST 1990
In article <2945 at uc.msc.umn.edu> wes at 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
More information about the Comp.unix.shell
mailing list