catching command line arguments from the shell [message #26839] |
Mon, 01 October 2001 00:01  |
Messages: 1 Registered: October 2001
|
Junior Member |
|
|
Hi,
I wonder if it is possible to pass the command line arguments to
the IDL pro directly from the shell? Say in the csh shell, when I
type:
idl testpro x=5 y=1 <return>
the idl procedure testpro can get the arguments "x=5" and "y=1".
Thanks.
Eric To
|
|
|
Re: catching command line arguments from the shell [message #26931 is a reply to message #26839] |
Thu, 04 October 2001 09:40  |
Phillip David
Messages: 36 Registered: April 1999
|
Member |
|
|
We do this with the following:
echo "testpro, x=5, y=1" | idl
This makes it like typing this line at the IDL command prompt. In this
case, though, you're really replacing your keyboard standard input with
a pipe as standard input. So if you want to be able to do further
processing from the command prompt, I believe you've lost that ability.
Widgets work fine, though.
Phillip
"KiWing To ����" wrote:
>
> Hi,
> I wonder if it is possible to pass the command line arguments to
> the IDL pro directly from the shell? Say in the csh shell, when I
> type:
> idl testpro x=5 y=1 <return>
> the idl procedure testpro can get the arguments "x=5" and "y=1".
> Thanks.
> Eric To
|
|
|