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

Home » Public Forums » archive » IDL and BASH scripts
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL and BASH scripts [message #68300 is a reply to message #68227] Tue, 13 October 2009 07:36 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
nata wrote:
> Hi guys,
>
> I wrote a script to help me with the most common actions I always do
> in IDL. I copy some folders, I update some files and finally I call
> IDL to do some actions.
> Normally I use something like this:
>
> idl <<!here
> some_actions
> @my_program.pro
> resolve_all
> save, filename='my_program.sav', /routines
> exit
> !here
>
> It works good but I've a problem if I try to run this code inside a
> case statement. My idea is to execute this code as an optional
> argument for my script. When I try to do it I've an error:
> here-document at line 127 delimited by end-of-file (wanted `!here')
> unexpected end of file
>
> I don't understand the error and I don't know if there are more
> options to call IDL and do some actions from a BASH script. Can
> anybody help ? Thanks,

Are you indenting in the case statement? If so, the "!here" won't be recognised if there
is whitespace in front of it.

If that is the case (no pun intended), in your script if you do something like

idl <<-NoMoreInput
some_actions
@my_program.pro
resolve_all
save, filename='my_program.sav', /routines
exit
NoMoreInput

i.e. put the "-" between the "<<" and end-of-file marker, you can tab in.

I also agree with pp on the use of "!here" as an eof marker - apart from any issue with
the ! character, it doesn't really explain what it does. But, that's just my personal
preference (I tend to be verbose in code :o).

Anyway, HTH.

cheers,

paulv
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: generate image to a no display environment
Next Topic: Re: CDAT

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

Current Time: Fri Oct 10 15:33:50 PDT 2025

Total time taken to generate the page: 1.60041 seconds