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

Home » Public Forums » archive » Re: Running IDL from the OS command line
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Running IDL from the OS command line [message #40813] Fri, 03 September 2004 02:10
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
On Thu, 02 Sep 2004 14:09:45 -0400, Paul Van Delst wrote:

> Hello,
>
> This is probably an easy question, but I couldn't find any information in hte IDL manuals
> (mostly because I wasn't sure what the correct terminology was).
>
> Can you run regular old IDL .pro functions from the OS prompt?
>
> I adapted the IDL code "Create_HTML_Doc" to work on my Fortran95 code to produce web pages
> of the header docs. I have a unix make file that bundles up all my Fortran source into
> tarballs for delivery. What I would like to do is also generate the HTML files in the same
> make file.
>
> So, if I have call the code like so in IDL:
>
> IDL> create_f90_html_doc, filelist
>
> where filelist is an array of files to parse, is it possible to call this directly from
> the OS prompt?
>
> I'm pretty sure it is, but bugger me if I can figure out how.
>
> Thanks for any tips,
>
> paulv

You can use the shell 'here-document' operator <<.

$idl << EOF
create_f90_html_doc, filelist
exit
EOF


This also works in shell scripts.

--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
Re: Running IDL from the OS command line [message #40820 is a reply to message #40813] Thu, 02 September 2004 13:14 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Craig Markwardt wrote:
> Paul Van Delst <paul.vandelst@noaa.gov> writes:
>
>
>> Hello,
>>
>> This is probably an easy question, but I couldn't find any information in hte IDL manuals
>> (mostly because I wasn't sure what the correct terminology was).
>>
>> Can you run regular old IDL .pro functions from the OS prompt?
>
>
> Paul, you can run an IDL command *script* from the unix command line.
>
> By "command script" I mean anything that you can load with
> @filename.pro from the command prompt. Just like the real command
> line, you can't use complex multi-line syntax, but you can call
> procedures that do.
>
> You invoke it as
> idl filename.pro
>
> Be sure to put any EXIT commands or whatever else you need to quit
> out. You don't need an END command since this is a command script.

Ahh, cool. I knew it was something simple, I just couldn't find the info in the IDL docs.

I just tested it out in my makefile - beyooteeful. Instant Fortran95 HTML documentation.
Lordy!

Thanks!

paulv
Re: Running IDL from the OS command line [message #40821 is a reply to message #40820] Thu, 02 September 2004 12:26 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Paul Van Delst <paul.vandelst@noaa.gov> writes:

> Hello,
>
> This is probably an easy question, but I couldn't find any information in hte IDL manuals
> (mostly because I wasn't sure what the correct terminology was).
>
> Can you run regular old IDL .pro functions from the OS prompt?

Paul, you can run an IDL command *script* from the unix command line.

By "command script" I mean anything that you can load with
@filename.pro from the command prompt. Just like the real command
line, you can't use complex multi-line syntax, but you can call
procedures that do.

You invoke it as
idl filename.pro

Be sure to put any EXIT commands or whatever else you need to quit
out. You don't need an END command since this is a command script.

I generally wrap my IDL command line invocations with a shell script
that also sets up the IDL_PATH.

Good luck,
Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: delete common block
Next Topic: Re: IDL with XP crashes. Is it normal???

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

Current Time: Fri Oct 10 22:39:41 PDT 2025

Total time taken to generate the page: 0.96053 seconds