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 > If not, can anyone please explain the difference in the implementation > of fold? 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. > Can piping tail -f to fold be made to work on Linux the way it works on BSD? There are various methods posted in the other thread. I will leave you to browse them. Bob _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils