I am trying to develop a condition that only closes the program when a logfile has been updated. I am using BASH script and i want the program to only close when the logfile i created has been updated. How do i go about doing that?
Asked
Active
Viewed 8 times
0
-
In evaluating the linked duplicate, keep in mind that if you can run an arbitrary command on a change, that command can be something that signals your script to tell it to exit. – Charles Duffy Nov 20 '20 at 17:46
-
...so, if you use the linked duplicate to make a function `run-on-change`, you could do something like `run-on-change kill "$$" &` to start a background process that will kill your current script when triggered. – Charles Duffy Nov 20 '20 at 17:56