Skip to content

Instantly share code, notes, and snippets.

@Ronald-TR
Created January 14, 2022 17:45
Show Gist options
  • Save Ronald-TR/95e70d5195ff66298c3598c20678fe04 to your computer and use it in GitHub Desktop.
Save Ronald-TR/95e70d5195ff66298c3598c20678fe04 to your computer and use it in GitHub Desktop.
Run command when file changes
# sudo pacman -S inotify-tools
# chmod +x reload.sh
FILE=diagram.py
while inotifywait -e close_write $FILE; do python $FILE; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment