« Back to home

Unix Text Editing Awesomeness

Oh, LaTeX acronym package, you won’t automatically alphabetize my list of acronyms? Strange… Let’s see if Unix will… $ echo "\acro{SCADA}{Supervisory Control And Data Acquisition} \acro{PLC}{Programmable Logic Controller} \acro{RTU}{Remote Terminal Unit} ..." > toSort $ for i in `cat toSort |sed "s/.*\\acro{\(.*\)}.*{.*}/\1/" | sort`; do grep "{$i}" toSort; done \acro{ADC}{analog to digital converter} \acro{API}{application programming interface} \acro{APT}{Advanced Persistent Threat} \acro{ASCII}{American Standard Code for Information Interchange} ... Unix, you rock my world.…

Read more »