Shell script to delete file if a pattern is found and restart servers
I have requirement to delete some log files from a directory if a string
"deletethisfile" is found.
Then restart the application servers.
1. Search for the string “deletethisfile” in server.log file under a directory, If found
2. Stop that particular server.
3. Delete the log file
4. Restart the server.
Thanks for your help in advance..