Created
April 22, 2019 14:51
-
-
Save jnovack/61d08890137fb28e0cabf203505e670e to your computer and use it in GitHub Desktop.
Awk - Print ONLY Match
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat files | awk '{for(i=1;i<=NF;i++){ tmp=match($i, /PATTERN/); if(tmp){print $i}} }' | sort | uniq -c | sort -rn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment