Created
October 30, 2017 22:27
-
-
Save prnthh/480c1117bf49e64c884be988ed676bab to your computer and use it in GitHub Desktop.
inotifywait macro for restarting a process when a file change is detected
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
| rerun(){ | |
| while inotifywait -e create,delete,modify .; | |
| do | |
| kill %% //kills the last background process | |
| $@ & //spawns new process in background | |
| done; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment