Skip to content

Instantly share code, notes, and snippets.

@bwhmather
Last active February 26, 2022 10:33
Show Gist options
  • Save bwhmather/dacc4ab74ab3afd2076c to your computer and use it in GitHub Desktop.
Save bwhmather/dacc4ab74ab3afd2076c to your computer and use it in GitHub Desktop.
Run a command when a file changes in the current directory
#!/usr/bin/sh
while true; do
reset;
"$@";
inotifywait -e MODIFY --recursive .;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment