Re: IDL output directed to STDERR-- can't seem to work around... [message #74219] |
Thu, 06 January 2011 01:33 |
Nigel Wade
Messages: 286 Registered: March 1998
|
Senior Member |
|
|
On 05/01/11 22:52, Ed Hyer wrote:
> Hey IDL Wizards,
>
> The IDL code, in this case, is .COMPILEd and SAVEd for execution from
> the Linux command line.
>
> The execution is done with a Perl wrapper that writes a namelist with
> options for the IDL code.
>
> my $result=exec("/usr/local/bin/idl -quiet -queue -rt=\'$idl_executable
> \' -args \'$namelist_file\' 2>&1");
>
> I was hoping that the "2>&1" would push the IDL output to STDOUT, but
> no such luck.
>
> I can't even lay odds as to whether this is a Perl thing or an IDL
> thing...
>
> --Edward H.
It's a shell thing. The "2>&1" is shell syntax, so it's only understood
by a shell. You would need to run a shell, with a shell script, to get
this to work. As it happens idl is actually a shell script so all you
probably need to do is prefix the command with /bin/sh (IDL runs under
/bin/sh by default).
--
Nigel Wade
|
|
|