LaTeX acronyms

Below is a BASH command which will find all undefined acronyms used in a LaTeX text.

The result can be pasted into the appendix which lists the used acronyms.

cat temp.txt |grep -oe "([A-Z]*\!)"|tr -d '\!()'|sort|uniq|xargs -i echo '\acro{'{}'}{'{}'}'

Exemplary result:

\acro{TRM}{TRM}
\acro{VM}{VM}
\acro{WML}{WML}
\acro{XP}{XP}