Skip to content

Instantly share code, notes, and snippets.

@astoeckel
Created December 14, 2015 23:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astoeckel/57b35f162d3cbe3e08b1 to your computer and use it in GitHub Desktop.
Save astoeckel/57b35f162d3cbe3e08b1 to your computer and use it in GitHub Desktop.
Search for evitable errors
#!/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