Patrick Proniewski writes: > On 27 sept. 2011, at 20:14, David Garfield wrote: > > > Any entry in a pipe could be buffering. In a quick test here, awk is > > buffering. To find the buffering, try using the pieces up to a given > > stage with " | cat " added at the end. If this buffers, you've found > > the problem. > > as far as my understanding goes, the simple fact I don't have my last output > into a tty is enough to trigger buffering.
Actually, any program that doesn't explicitly block buffering and uses stdout will get buffering. Some block buffering. Some (like probably iostat) explicitly flush the buffers. Some don't use stdout. Others get buffered. > > Unbuffered output is usually slower, so it is normally > > done only to a terminal. I think the only easy way to externally > > disable the buffer is to wrap the program in a pseudo-tty. > > apparently... not so easy by the way :) Well, I think there are three choices for arbitrary programs: 1) Wrap it in a pseudo-tty. I think I've seen a program to do this, but I don't remember where/what. 2) Override isatty() through an LD_PRELOAD. 3) Change the source, either to the program or to libc. > > Alternatively, look for an option that lets you explicitly unbuffer. > > (for instance, in perl, do: $| = 1; ) > > nothing in awk, but I could try sed instead (-l Make output line > buffered) > > regards, > patpro --David Garfield _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users