my requirement is as below:
i have a application server logs from which i need to grep for certain word say "hung" and restart the server if i found the word. i have written the script but there was a strange issue which is at first occurrence it finds and restarts the server but again after next interval of corn job it runs again and finds same word and keeps on restarting the server on every interval. how do i avoid this situation.
i want shell not to pick previously read message. can anyone help me on this