Shell script to delete file if a pattern is found and restart servers
Hi,
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.. |
Code:
Pseudo-shell-code: |
Thanks Zirias
Thanks for the quick reply..
|
All times are GMT -5. The time now is 09:44 AM. |