Originally Posted by oneindelijk
And if you use tail -f file | sed -u 's/ /Xx/g' ?
Yeah, it gets stuck, that's what I meant by reproduce the problem.
Originally Posted by Snark1994
I assume this is because 'tail' is waiting for a newline before passing anything through the pipe
I thought so too, but then I found that tail -f kermit.log | cat
outputs everything. I think it's because sed operates on lines, so it has to wait for newline before it starts processing. Furthermore:
# this hangs (awk operates on lines by default):
tail -f kermit.log | gawk 1
# changing the record separator to multiple spaces does give output:
tail -f kermit.log | gawk -vRS=' +' 1