Skip to content

Instantly share code, notes, and snippets.

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