This is Ubuntu (3.13.0-29-generic #53), trying to do a simple bash script to monitor a log file for matching lines.
If I do the following, there is no output in the bash shell except for matches, which is expected:
tail -F server.log | grep --line-buffered "word" | tee -a wordwatch.log
But if I try to do the same thing in a screen, the session is spammed with unmatched data from the watched log file. Apparently it's showing everything from the watched log file. This spam does not appear in the output log file.
screen -S "wordwatch" tail -F server.log | grep --line-buffered "word" | tee -a wordwatch.log
What am I doing wrong and how do I stop the watched log from spamming the screen session?