Last active
February 9, 2016 06:33
-
-
Save kevin47/edc4d11c5cd127fc6b47 to your computer and use it in GitHub Desktop.
This file contains 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
join <( tr A-Z a-z < $1 | tr -s '[:space:][:punct:]' '\n' | sort | uniq -c | awk '{print $2, $1}' ) <( tr A-Z a-z < $2 | tr -s '[:space:][:punct:]' '\n' | sort | uniq -c | awk '{print $2, $1}' ) | awk -v n=${3:-1} '{if ($2 >= n && $3 >= n) print $1}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment