Grep On Continous Stream

We can use --line-buffered argument in grep command.

Usage

tail -f file | grep --line-buffered my_pattern

Source: StackOverFlow

Last updated