I’m looking for a way to get the information written to stdout and
stderr from a C program to log to a file. In HP-UX, you can configure
the hpterm or xterm to log to a file. Is there a way to get pterm to log
to a file?
Or, is there a way to enable scroll bars for pterm?
Thank you for your help.
jt
====================================================
Jeff Taylor
Software Remodeling, Inc.
Jeff Taylor <jtaylor@softwareremodeling.com> wrote:
I’m looking for a way to get the information written to stdout and
stderr from a C program to log to a file.
program > file 2> errfile
Will send stdout to file, and stderr to errfile
OR
program > file 2>&1
Will send stdout and stderr to file.
-David
Thanks David! Only thing is, I need to be able to interact with the
program via the pterm and log the pterm traffic to file. Many terminal
emulators (on other os’) have this capability and was wondering if I’ve
missed something about pterm, since I’ve been using cut and paste and
page-up/page-down to reassemble a log file after an application run.
David Gibbs wrote:
Jeff Taylor <> jtaylor@softwareremodeling.com> > wrote:
I’m looking for a way to get the information written to stdout and
stderr from a C program to log to a file.
program > file 2> errfile
Will send stdout to file, and stderr to errfile
OR
program > file 2>&1
Will send stdout and stderr to file.
-David
–
Jeff Taylor <jtaylor@softwareremodeling.com> wrote:
Thanks David! Only thing is, I need to be able to interact with the
program via the pterm and log the pterm traffic to file. Many terminal
emulators (on other os’) have this capability and was wondering if I’ve
missed something about pterm, since I’ve been using cut and paste and
page-up/page-down to reassemble a log file after an application run.
Have you looked at the tee utility? It allows you to split stdout
between the screen and a file.
-David
David Gibbs wrote:
Jeff Taylor <> jtaylor@softwareremodeling.com> > wrote:
I’m looking for a way to get the information written to stdout and
stderr from a C program to log to a file.
program > file 2> errfile
Will send stdout to file, and stderr to errfile
OR
program > file 2>&1
Will send stdout and stderr to file.
-David
–