I am using tail -f to monitor a log file that is being actively written to. When a certain string is written to the log file, I want to quit the monitoring, and continue with the rest of my script.
Currently I am using:
tail -f logfile.log | grep -m 1 "Server Started"
When the string is found, grep quits as expected, but I need to find a way to make the tail command quit too so that the script can continue.