Where has my output gone???

A

Andrew Walrond

I run my ruby script, and it produces lots of output

I run the same script, but redirect the output to a file (bash shell using >),
no output!

Whats going on? I just know there is a simple answer, and I have a nagging
feeling that its been discussed here before...

Help...quick...please... before I pull _all_ my hair out!

TIA

Andrew Walrond
 
S

Steve Litt

I run my ruby script, and it produces lots of output

I run the same script, but redirect the output to a file (bash shell using

Whats going on? I just know there is a simple answer, and I have a nagging
feeling that its been discussed here before...

Help...quick...please... before I pull _all_ my hair out!

TIA

Andrew Walrond

Is there any chance that your program is outputting to stderr instead of
stdout?

SteveT

Steve Litt
http://www.troubleshooters.com
(e-mail address removed)
 
R

Robert Klemme

Andrew said:
I run my ruby script, and it produces lots of output

I run the same script, but redirect the output to a file (bash shell
using >), no output!

Whats going on? I just know there is a simple answer, and I have a
nagging feeling that its been discussed here before...

Help...quick...please... before I pull _all_ my hair out!

Did you wait until your script actually terminated? If not, you probably
became a victim of buffering. Try $stdout.sync=true or $>.sync=true at
the start of the script instead of pulling hair out.

Kind regards

robert
 
A

Andrew Walrond

became a victim of buffering. Try $stdout.sync=true or $>.sync=true at
the start of the script instead of pulling hair out.

Damn. I should have known that.

Thanks Robert!

Andrew Walrond
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top