Mailinglist Archive: opensuse (1620 mails)

< Previous Next >
Re: [opensuse] I thought I knew the basics - "tee" not working as I expected
On Wed, Nov 12, 2014 at 10:32 AM, Bernhard Voelker
<mail@xxxxxxxxxxxxxxxxxxx> wrote:
On 11/12/2014 04:13 PM, Greg Freemyer wrote:

Is there a way to force tee to flush it's buffers? (Or tee may not be
the problem.)

== details

I have an interactive program I want to capture the output of. It
only has one prompt, then it runs to completion

It's a python app. I'm running inside konsole and my basic command is:

python preg.py | tee output_file


Have you try stdbuf(1)?

$ stdbuf --output=0 python preg.py | tee output_file


You are the magic man. It works perfectly!

Thanks
Greg
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups