Re: Interactive programs & Teeing
- From: "Mumia W. (reading news)" <paduille.4060.mumia.w@xxxxxxxxxxxxx>
- Date: Tue, 28 Nov 2006 00:20:41 GMT
On 11/27/2006 04:09 PM, conrado.blasco@xxxxxxxxx wrote:
I'm trying to write an interactive script that gets commands from
STDIN, prints the results to STDOUT, *and* tees the results to a log
file. [...]
(Well, it actually still prints something, but only when the session is
over.)
[...]
It's best just to open the log file and print twice: once to STDOUT and once to the log file.
The combination of Perl's buffering and tee's buffering result in your inability to get immediate output if STDOUT is sending to tee.
--
paduille.4060.mumia.w@xxxxxxxxxxxxx
.
- References:
- Interactive programs & Teeing
- From: conrado . blasco
- Interactive programs & Teeing
- Prev by Date: Re: Help improving IO::Socket script response
- Next by Date: Re: Expression problem
- Previous by thread: Re: Interactive programs & Teeing
- Next by thread: Help improving IO::Socket script response
- Index(es):
Relevant Pages
|