comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Capturing screen output
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Capturing screen output [message #28088] Tue, 20 November 2001 12:27 Go to previous message
David Shadovitz is currently offline  David Shadovitz
Messages: 19
Registered: September 2000
Junior Member
I'm running IDL 5.4 on a Sun.

I've got a file, cpsub1, which looks like this:

$ cat cpsub1
echo "computePPP, /batch, inputfile='abc.hdf'" | idl

If I run it by simply typing cpsub1 at the command line, all of the IDL
messages and PRINT statement outputs are sent to the screen:

$ cpsub1
% Compiled module: MODULE1
% Compiled module: MODULE2
% Compiled module: MODULE3
Entered main routine...
Computing the power...
Done.
$

I'd like to capture that information in a log file, so I tried
redirecting standard output, like this:

$ cat cpsub2
echo "computePPP, /batch, inputfile='abc.hdf'" | idl > cplog2

$ cpsub2
% Compiled module: MODULE1
% Compiled module: MODULE2
% Compiled module: MODULE3
$

As you can see, now only the IDL messages are written to the screen.
But the PRINT statement outputs aren't sent to the log file! Upon
completion, cplog2 is a 0-byte file.

Then I tried redirecting both standard output and standard error:

$ cat cpsub3
echo "computePPP, /batch, inputfile='abc.hdf'" | idl > cplog3 2>&1
$ cpsub3
$

Now nothing is written to the screen. But neither is it going to the
log file! Upon completion, cplog3 is a 0-byte file.

Can anyone help me capture the IDL messages and the PRINT statement
output into a file? I'm running my code in this odd manner because
ultimately I want to run the job in batch mode via 'ssub'.

Thanks.
-David Shadovitz
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Can't make widgets work
Next Topic: multitaper spectral analysis code?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:54:01 PDT 2025

Total time taken to generate the page: 0.00427 seconds