Many text-based commands will buffer their output. This makes it efficient to process very large text files, but it can cause serious lag/"stuttering" when interactively watching the output of, for example, tail -f
.
grep --line-buffered
perl -e '$|++'
awk '{ print $0; fflush(stdout) }'
sed -u
tail -f
— (TODO: I believe this automatically disables buffering, but I'm not 100% sure.)