Is that possible to use grep
on a continuous stream?
What I mean is sort of a tail -f
command, but with grep
on t
In most cases, you can tail -f /var/log/some.log |grep foo
and it will work just fine.
If you need to use multiple greps on a running log file and you find that you get no output, you may need to stick the --line-buffered
switch into your middle grep(s), like so:
tail -f /var/log/some.log | grep --line-buffered foo | grep bar