How to stop sed from buffering?
I think I found it. For some reason, grep doesn't automatically do line buffering. I added a --line-buffered
option to grep
and now it responds immediately.
You only need to tell grep and sed to not bufferize lines:
grep --line-buffered
and
sed -u