Created
October 14, 2012 18:23
-
-
Save jphpsf/3889392 to your computer and use it in GitHub Desktop.
Trigger a command when file changes (bash function)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loop { | |
echo -e "\nWaiting for changes..." | |
while inotifywait -qr -e close_write . | |
do | |
clear && $@ && echo -e "\nWaiting for changes..." | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment