Last active
May 18, 2018 08:48
-
-
Save pyrocat101/10435755 to your computer and use it in GitHub Desktop.
CS35L - Homework 2
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
# get content in <td>...</td> | |
sed -n 's/<td>\(.*\)<\/td>/\1/gip' | \ | |
# remove empty lines | |
grep -v "^\s*$" | \ | |
# remove odd lines | |
sed -n '1~2!p' | \ | |
# remove <u> tags | |
sed 's/<u>\(.*\)<\/u>/\1/gi' | \ | |
# convert apostrophe (` -> ') | |
sed "s/\`/'/g" | \ | |
# split comma separated words into lines | |
sed "s/, /\n/g" | \ | |
# remove leading and trailing whitespace per line | |
sed "s/^\s*//g;s/\s*$//g" | \ | |
# remove non-Hawaiian words (by vocabulary) | |
grep -i "^[pk'mnwlhaeiou]*$" | \ | |
# convert to all lower case | |
tr '[A-Z]' '[a-z]' | \ | |
# remove duplicate and sort | |
sort -u |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment