Code:
for D in /; do wc -l ${D}/ > ${D%/}Request;done
for D in / will process a single file, namely /.
Quote:
Originally Posted by avyadav555
I want to read only .CUD files . Please suggest
NOTE: i have multiple directory, all directory contains .cud and .cur files. here i want data(no of lines) which are in .cud files only
|
You need to generate the list of all your CUD files, then run wc on them. E.g.
Code:
wc -l $(find / -name ‘*.CUD’)
This will fail if there are too many CUD files. A better way is building the wc command into
find, for example
Code:
find / -name ‘*.CUD’ -exec wc -l {} +
The strange string {} indicates the file that was found.