Search This Blog

Friday, February 6, 2009

Counting vowels in a file using the grep

[counting vowels]
grep -io [aeiou] a.sh | wc -w
cat a.sh | tr 'bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ1234567890()~`!@#$%^&*"()_+{}|:"<>?,./;][=-' ' ' | grep -io [aeiou] | wc -w


[counting only a ]
grep -io [aeiou] a.sh | grep a | wc -w
grep -io a a.sh | wc -w

No comments:

Post a Comment