Skip to content

Instantly share code, notes, and snippets.

@jakkaj
Created May 22, 2019 21:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakkaj/98826a3869dd9beda69be10557af8f7f to your computer and use it in GitHub Desktop.
Save jakkaj/98826a3869dd9beda69be10557af8f7f to your computer and use it in GitHub Desktop.
Wait for bash script changes and act on them... in bash
#from https://github.com/rvoicilas/inotify-tools/wiki
apt-get install inotify-tools
inotifywait -r -m -e close_write ./spark.sh |
while read path _ file; do
echo "$path$file modified"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment