Does anyone know how I can let the output of a linux program go to stdout and also a file output at the same time? This is because I want to see the progress on stdout (takes hours to run it), but at the same time I want to log the output in a text file too.
Steps to profit:
1. "pipe" it into a file
2. open a new console
3. tail -f file
Name:
Anonymous2007-03-24 12:57 ID:f13QpSQD
steps to profit:
1. use the program "tee"
Name:
Anonymous2007-03-24 13:59 ID:XJ7VWeDH
Pipes are monads.
Tee is an arrow.
OH SHI-
Name:
Anonymous2007-03-25 1:08 ID:j7KNsOP5
This is the OP. tried >>6 before but the output is buffered so it doesn't write to the file until the program exits. not keen to insert fflush command everywhere in the code. need help from EXPERT LINUX PROGRAMMERS.
>>9
outright refusal to flush stuff when you want it output means you're a CRAPPY LINUX PROGRAMMER, and any advice from EXPERT LINUX PROGRAMMERS would be wasted on you.
also, tee.
Name:
Anonymous2007-03-25 3:34 ID:j7KNsOP5
>>11
This is the OP. It's not my code, someone else, too massive to do anything without breaking something. Anyway thanks for the good advice (tee). force indentation of code thread over.
Name:
Anonymous2007-03-25 8:26 ID:0tlL9JKE
EXPERT LINUX PROGRAMMERS DO NOT LIKE THIS THREAD
^Die
Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy