Created
December 14, 2015 23:18
-
-
Save astoeckel/57b35f162d3cbe3e08b1 to your computer and use it in GitHub Desktop.
Search for evitable errors
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
#!/bin/bash | |
./clean.sh | |
FILES="`find chapters/ appendix/ frontmatter/ backmatter/ -name "*.tex" | sort` glossary.tex" | |
for FILE in $FILES; do | |
echo "=============" | |
echo $FILE | |
echo "=============" | |
# List uses of "an" and "a" in combination with vowels | |
ack -i --color-match=on_magenta "($|\\s)(a\\s+[aeiou])" $FILE | |
# ack -i --color-match=on_green "($|\\s)(an\\s+[aeiou])" $FILE | |
# Uppercase after colon | |
ack --color-match=on_blue ":\\s+[A-Z]" $FILE | |
# British english | |
ack -i --color-match=on_red '(?!size).iz' $FILE | |
# Unwanted word repetition | |
ack -i --color-match=on_yellow "\b((\w*[aeiou]\w*)(?:\s+\2\b)+)" $FILE | |
echo | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment