Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- abc abb cabby
- grep -E "[abc]" test.txt | wc -l
- grep 'abcdef' testCount.txt | wc -l
- $ echo "abc abb cabby" |
- awk '{
- for(i=1;i<=NF;i++)
- if(sub(/a/,"",$i)>0 && sub(/b/,"",$i)>0 && sub(/c/,"",$i)>0) {
- count+=1
- }
- }
- END{print count}'
- 2
- <file grep -ow 'w+' | grep a | grep b | grep c
- abc
- cabby
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement