RE: Word Count for a specific set of files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Nabin Limbu Sent: Friday, June 18, 2004 07:01
> 
> #!/bin/bash
> j=1
> for i in `ls -1rS`
> do
> if [ $j -gt 10 ]; then exit; fi
> j=`expr $j + 1`
> echo `wc -w $i`
> done
> 

Or:

for F in `ls -1rS | head -10`; { wc -w $F; }

Regards, Hugh

-- 
Hugh E Cruickshank, Forward Software, www.forward-software.com 


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux