Shell script to find two strings in a file

Ramaraju Member Posts: 3 Green Ribbon

Hi All,

Please help on following requirement.

Server is taking some time to start or fail with "Started" or "Failed" strings in log file. We need to start 4 servers one by one. If the first server is up successfully then we can proceed to start second server.

We want to automate this startup with shell script. Can you help how to check these strings continuously in log file for every 30 seconds until find the any one of the string and show the status in echo?

Server: RHEL 7