inotifywait execute command when any file in folder changes code example
Example: linux bash do something when file changes
while inotifywait -e close_write myfile.py; do ./myfile.py; done
while inotifywait -e close_write myfile.py; do ./myfile.py; done