Friday, 30 October 2009

find number of lines starting with letter z

I want to find the lines starting with "z" of all the files inside ./input/inputfiles and count them.



find ./input/inputfiles/ -type f | xargs -i perl -wnle '/^r/ and print $_; ' {} | wc -l

No comments:

Post a Comment

Tweets by @sriramperumalla