I want to loop  a process in a bash script, it is a process which should run forever but which sometimes fails.When it fails, it outputs >>747;3R to its last line, but keeps running.I tried (just for testing)while [ 1 ]do  mono Program.exe  last_pid=$1  sleep 3000  kill $last_piddonebut it doesn't work at all, the process mono Program.exe just runs forever (until it crashes, but even then my script does nothing.)
Restart a running process if it outputs a particular string?
bash;shell script;shell;scripting