Asked • 05/02/19

How to 'grep' a continuous stream?

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.

1 Expert Answer


Cheryl F. answered • 05/04/19

New to Wyzant

Scientific Programming is Science aided by Software

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.