We can use --line-buffered argument in grep command.
--line-buffered
grep
tail -f file | grep --line-buffered my_pattern
Source: StackOverFlow
Last updated 3 months ago