Re: non-interactive IDL from scripts [message #4361] |
Fri, 26 May 1995 00:00 |
zowie
Messages: 9 Registered: March 1994
|
Junior Member |
|
|
ROBERTO BIANCONI (roberto.bianconi@cen.jrc.it) wrote:
: Hi,
: is there anybody who can tell me how to start IDL from a UNIX script?
: IDL non-interactive works fine if I input at prompt:
: idl mycommands.pro
: but this instruction inside a script gives me the following error
: message:
: idl: 0402-021 Cannot run the command as specified.
I write lots of shell scripts, as you can do all kinds of looping
operations that are more sophisticated than what you can do inside
IDL, and I find that IDL leaks memory badly enough that I often have
to restart it anyway in the middle of a job.
They usually go something like this (I know, I know, csh is broken --
pick your own intepreter)
-------- clip here ---------
#!/bin/csh
foreach foo( bag bar baz )
sed -e "s/FLETCH/${foo}/" << ALLDONE | /usr/local/bin/idl
[a bunch of IDL commands here, with the search pattern "FLETCH" instead
of the targeted word ]
ALLDONE
-------- clip here ---------
I guess the point here is that you can send commands to idl on the standard
input. IDL thinks it's running interactively, and you can send its
stdout and stderr to a log file just like you Really Want To.
Cheers,
Craig
--
Craig DeForest "My research group launched a rocket into space, and all I
got was this lousy T-shirt"
|
|
|