Bob Proulx wrote: > Philip Durbin wrote: >> To word wrap the output of a growing log file I tried. . . >> $ tail -f log.txt | fold -s >> . . . and it works fine on NetBSD and Mac OS X, but on the two Linux >> distributions I tried (Red Hat and SUSE) I get no output. > > This topic comes up periodically. Please see this reference for a > recent more thorough discussion: > > http://lists.gnu.org/archive/html/bug-coreutils/2008-11/msg00134.html > > In summary it is all about I/O buffering happening in libc's output > routines. If the output is not a tty then data is buffered for > performance reasons into larger chunks before writing.
Well tail -f flushes stdout so it's not actually the problem in this case. I think this may be due to the i18n changes applied by your distro. You can disable this logic using the LC_ALL environment variable. Can you see if this works around the problem for you: tail -f log.txt | LC_ALL=C fold -s cheers, Pádraig. _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils