output redirection from a compat - (nf)
rpw3 at fortune.UUCP
rpw3 at fortune.UUCP
Sun Jun 10 21:06:31 AEST 1984
#R:linus:-97200:fortune:11600099:000:1233
fortune!rpw3 Jun 10 01:41:00 1984
Re: getting programs to do unbuffered output if you only have binaries of them
All of the previous responses have correctly analyzed the problem (no 'fflush'
when needed on a non-terminal stdout), but none provided solutions. Here is a
generic solution (but I may hate myself when I read this in the morning :-)
[ UGLY UGLY UGLY hack#1 ]
If you have ptys on your system, you can 'cu' to the master side of
a pty (you may have to hack up 'cu' to get this to work), log in again
on the other side, send yourself a redirection LEAVING ECHOING ON
(use "~>>file", note no colon), run your chess example, and close
your log file with 'echo "~>"', and logout, and logout.
[ UGLY UGLY UGLY hack#2 ]
If you have a network, and a 'vtp' that can make a log/script file, "connect"
to the system you are on and proceed as above...
[ UGLY UGLY UGLY hack#3 ]
If all else fails, and you have at least one dialout line plus one more
dialin line, use 'cu', dialout, dialin, and see Lemma #1...
(Sometimes you just have to get the job done, no matter how ugly the hack.)
Rob Warnock
UUCP: {ihnp4,ucbvax!amd70,hpda,harpo,sri-unix,allegra}!fortune!rpw3
DDD: (415)595-8444
USPS: Fortune Systems Corp, 101 Twin Dolphin Drive, Redwood City, CA 94065
More information about the Comp.unix.wizards
mailing list