Run Command on File Update


This is a poor man’s “watch a file for changes and when it does, run a command”.


while true; do inotifywait --event modify a-document.tex ; pdflatex a-document.tex ; done