grep tail 1

grep tail

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

Here is what the above code is Doing:
1. tail -f file
2. grep –line-buffered my_pattern

The –line-buffered option tells grep to flush its output buffer after each line.

Similar Posts