bash execute script on file change 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