I have a process that writes logs to a acc.txt
file and I'm trying to restart the process when a certain string has been found inside of that .txt
file. Once the string is found and matches with what I'm looking for, the acc.txt
contents should be cleared and process must be killed.
UPDATE: Errors fixed, see solution below.