littleIdiot
MIS
Unsure if this is the right forum, but I already tried UNIX and got no-where, hoping this give me more ...
I have a .c program I am running on Solaris.
As the program runs, it writes text out to the terminal window. I want to capture this text in a log file so that other users can tail -f the log file and see what is happening.
I have had a loko atthe source code and can see that the text is written out using printf("text");
I have tried the following:
This does not output anytihng until the program ends, so no use. The -f (flush) option is not valid on our system (SunOS 5.8).
The program does not run
I tried all sorts of variations including 2>&1 etc - again, the program does not run.
I do not want to share my terminal window using netmeeting or anything similar.
Any other ideas?
I assume I could edit the program to write out to a log file, but I don't really want to have to do that - it's a delicate (read: flakey/shoddy) program and I don't want to start tinkering with it.
Cheers.
I have a .c program I am running on Solaris.
As the program runs, it writes text out to the terminal window. I want to capture this text in a log file so that other users can tail -f the log file and see what is happening.
I have had a loko atthe source code and can see that the text is written out using printf("text");
I have tried the following:
Code:
script
program
Code:
program | tee -a file.log
Code:
prgram > file.log
I do not want to share my terminal window using netmeeting or anything similar.
Any other ideas?
I assume I could edit the program to write out to a log file, but I don't really want to have to do that - it's a delicate (read: flakey/shoddy) program and I don't want to start tinkering with it.
Cheers.