bash run script on changed file code example Example: linux bash do something when file changes while inotifywait -e close_write myfile.py; do ./myfile.py; done