Is there some one-line way in bash/GNU tools to block until there\'s a string matched in a file? Ideally, with timeout. I want to avoid multi-line loop.
Upda
tail -f file | grep word | head -n1
Will post snip with async timeout
For now: How to include a timer in Bash Scripting?
The linked answer defines a 'run_or_timeout' function that does what you are looking for in a very bash-savvy way