If one launches the script using ./watch.sh &
It runs in the background, even after the terminal session that launched it is closed.
To stop the script, currently the solution is to useps aux | grep "watch.sh" and ps aux | grep "inotify"
and then killing all of them using : kill PID_of_process
Or alternatively, to stop it we can restart of log out but that's not fun.
There could be another way to stop the script, possibly using awk and sedalong with ps and grep.
Possibly, a second script can be written to terminate watch.sh sucessfully.
Anyone can take up this issue.
If one launches the script using
./watch.sh &
It runs in the background, even after the terminal session that launched it is closed.To stop the script, currently the solution is to use
ps aux | grep "watch.sh"
andps aux | grep "inotify"
and then killing all of them using :kill PID_of_process
Or alternatively, to stop it we can restart of log out but that's not fun.There could be another way to stop the script, possibly using
awk
andsed
along withps
andgrep
.Possibly, a second script can be written to terminate watch.sh sucessfully. Anyone can take up this issue.