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

Home » Public Forums » archive » Unix command line arguments to IDL program?
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
Unix command line arguments to IDL program? [message #17173] Tue, 14 September 1999 00:00 Go to next message
Craig Hamilton is currently offline  Craig Hamilton
Messages: 28
Registered: December 1996
Junior Member
Hi all:

How can I do the following:

Say I have a file xyz.dat with some interesting information in it,
and I have an IDL program, idlinfo.pro, that will read that file and
show me that interesting information. I want to type
the following at a Unix prompt and have the IDL program
startup and show me the info in file xyz.dat:

% showinfo xyz.dat

I realize (I think) that "showinfo" must be a script and so far I've
come up with the following script that will
start up my IDL program, idlinfo.pro :

#!/bin/csh
echo 'idlinfo' | idl

Now the problem is to get the filename xyz.dat to the
IDL program somehow. So far, all I've come up with
is writing a temp file into /tmp that idlinfo.pro is looking
for. There has got to be a better way.

Someone please enlighten me.

Thanks,
Craig

-Craig A. Hamilton,PhD cah@medeng.wfubmc.edu
-Wake Forest Univ. School of Medicine
-Dept. of Med. Engr. / MRI Center
-Medical Center Blvd.
-Winston-Salem, NC 27157-1022
-(336)716-2819 [FAX: 2870] [Secr: 6890]
Re: Unix command line arguments to IDL program? [message #17277 is a reply to message #17173] Thu, 16 September 1999 00:00 Go to previous message
Craig Hamilton is currently offline  Craig Hamilton
Messages: 28
Registered: December 1996
Junior Member
Axel vom Endt wrote in message <37DEB029.17E7ADCC@bu.edu>...
> Craig Hamilton wrote:
>
>> I want to type
>> the following at a Unix prompt and have the IDL program
>> startup and show me the info in file xyz.dat:
>>
>> % showinfo xyz.dat
>>
>
> I'd use a script like
>
> #!/bin/csh
> idl << EOF
> idlinfo $1
> EOF
>
>
> Hope that helps
>
> Axel

Thanks, Axel! That's just what I needed. Just needed to add
a little punctuation to your script, and I'm on my way....

#!/bin/csh
idl << EOF
idlinfo, '$1'
EOF
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: device, get_decomposed question
Next Topic: New version of VELOVECT

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

Current Time: Sat Oct 11 22:11:18 PDT 2025

Total time taken to generate the page: 1.58155 seconds