How to 'grep' a continuous stream?
Asked 07 September, 2021
Viewed 844 times
  • 56
Votes

Is that possible to use grep on a continuous stream?

What I mean is sort of a tail -f <file> command, but with grep on the output in order to keep only the lines that interest me.

I've tried tail -f <file> | grep pattern but it seems that grep can only be executed once tail finishes, that is to say never.

12 Answer