Apparantely, stdout is buffered. The simple solution is to use
'/usr/bin/unbuffer' (how didn't I think of that?!).
BTW, man unbuffer has:
"BUGS
The man page is longer than the program."
:-)
--
Aviram Jenik
Beyond Security Ltd.
http://www.BeyondSecurity.com
http://www.SecuriTeam.com
Know that you're safe:
http://www.AutomatedScanning.com
----- Original Message -----
From: "Aviram Jenik" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, January 20, 2002 8:09 PM
Subject: stdout weirdness
> Hi,
>
> I'm having the following programming program: I have an app (an external
app
> which I cannot modify), that sends info to stdout, which I want to
capture.
> If I run the app without redirection, I can see the output coming out
> immediately sent out to the screen. To emphasize:
> $ ./externalApp
> line 1
> line 2
> line 3
> ...
>
> However, if I redirect the input to a file, or pipe it into another app
(my
> own), the output only starts to show after ~4 minutes. There's no text
> missing, it just appears 'late'.
>
> This is as if the external app forgot to 'flush' or something. Like I
said,
> I can't modify this external app and I have to work around it.
>
> Any ideas?
>
> --
> Aviram Jenik
> Beyond Security Ltd.
> http://www.BeyondSecurity.com
> http://www.SecuriTeam.com
>
> Know that you're safe:
> http://www.AutomatedScanning.com
>
>
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]