17 July 2011

find the number of occurrences of a string in a file with grep -o "string" < ~/file | wc -w

No comments:

Post a Comment

Pages