Created
October 14, 2012 18:23
Trigger a command when file changes (bash function)
This file contains hidden or 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