hi
i have a directory /tmp/Satya,it contains
5.FILE
6.FILE
7.FILE
i need to read each file , and read its content line by line
please help
thanks
Satya
hi
i have a directory /tmp/Satya,it contains
5.FILE
6.FILE
7.FILE
i need to read each file , and read its content line by line
please help
thanks
Satya
for filename in `ls -1 /tmp/Satya/*.FILE` #get the list of files
do
while read line
do
echo $filename $line
done<$filename
done
it depends on what you are going to do with each line read. If you just want to display them line by line
cat /tmp/Satya/*.FILE or
awk '{print}' /tmp/Satya/*.FILE