hi
i have directory (/tmp/Satya)that contains lots of files.
i need to get the no of files and read them one by one
please help
thanks in advance
Satya
hi
i have directory (/tmp/Satya)that contains lots of files.
i need to get the no of files and read them one by one
please help
thanks in advance
Satya
find /tmp/Satya -type f | \
while read filename
do
while read rec
do
echo "$rec"
done < $filename
done
This reads each file line by line
hi jim,
when i used the above the file name is coming as "/tmp/Satya/10.File" , but i want only 10.File,please help
You can just add
basename $rec
Or you can modify the find command:
find /tmp/Satya -type f -printf "%f\n"