I am trying to tail a log file. At some point the program writing to the log file will say "your foo is ready". I expect my tail -f
to conclude gracefully. So I came up with the following lines of code:
tail -f out.log | grep ready | while read ln; do
echo "ln: $ln"
done
I stopped my coding prematurely since I cannot understand why I don't see any output.
--line-buffered
for thegrep
commnad. – αғsнιη Apr 08 '21 at 12:26--line-buffered
it will loop and wait for the next "your foo is ready" – Mr R Apr 08 '21 at 12:27