errata
[phd-thesis.git] / glossary.bash
1 #!/bin/bash
2
3 entries () {
4 grep -Po "(newglossaryentry|new(abbreviation|acronym)(\[.*\])?)\{[A-Z0-9]+" "$1" | grep -Po "[A-Z0-9]+$"
5 }
6
7 # find number of occurances
8 entries preamble/glossaries.tex | xargs -I'<>' bash -c 'echo -n "<> " && grep -ni --color=always "{<>}" {appx,front,back,intro,concl,top,tvt,dsl}/*.tex | wc -l' | sort -nk2
9
10 # find uses without \gls*{}
11 #entries preamble/glossaries.tex | xargs -I'<>' grep -nPi --color=always "[ ]<>[. $]" {appx,front,back,intro,concl,top}/*.tex