Skip to content

Instantly share code, notes, and snippets.

@PetrGlad
Created August 7, 2015 11:05
Show Gist options
  • Save PetrGlad/c38ec06d99d70b02f874 to your computer and use it in GitHub Desktop.
Save PetrGlad/c38ec06d99d70b02f874 to your computer and use it in GitHub Desktop.
FILETOWATCH=script.py
TARGET=me@host:/home/me/
while inotifywait -e close_write $FILETOWATCH;
do
scp $FILETOWATCH $TARGET;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment