Worth Reading: entr: Rerun Your Build when Files Change
Julia Evans recently described another awesome Linux tool: entr allows you to run a bash command every time a watched file changes (and it works on Linux and OSX).
I wish I found it years ago…
Same can be achieved with Inotify (https://www.linuxjournal.com/content/linux-filesystem-events-inotify) inside a while-true loop.