Word Count for a specific set of files

James H. Cutts III jcutts at coin.org
Fri Jun 18 13:16:07 UTC 2004


I need some shell scripting assistance.  I want a word count of the
smallest 10 files in a directory.  

I can get the list of the smallest 10 files:  ls -1S | tail  

I can get the count of a list of files: wc <fn1> <fn2> ... <fn10>

How can I put these two commands together to get wc to use the list
of files I get back from the ls / tail command.

Thanks,
James H. Cutts III
Computer Project Manager
SOM-RES / CORI
University of Missouri - Columbia





More information about the redhat-list mailing list