How can I achieve unbuffering without Tcl?

73 Views Asked by At

I'm a happy user of unbuffer, but am now faced with a system that doesn't have Tcl installed (and I don't have root privileges).

Can I achieve the same effect without using Tcl? A scripting solution would be nice, but I would not be averse to even writing some C...

2

There are 2 best solutions below

0
On

Reading the man page of stdbuf, it seems the following might do it:

stdbuf --output=0

... followed by your command, on the same command-line (like you're used to with unbuffer).

You can also "unbuffer" your stdin and/or stderr if you like, with --input=0 and --error=0.

0
On

If you build Tcl and Expect from source you can configure them to install under a personal account without root access.