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

Home » Public Forums » archive » Re: to use linux commands inside idl
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: to use linux commands inside idl [message #82623] Wed, 02 January 2013 02:26
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Tuesday, January 1, 2013 10:16:08 PM UTC-5, sid wrote:
> Hello everyone,
>
> I want to use the linux command inside the idl program
>
> My linux command is,
>
>
>
> sed -i 's/\(.*data=dblarr(4,ss2).*\)/data=dblarr(4,ss2)&ir=dbla rr(16)/g' progo_dark_limb0.pro
>
> now if I use $ sign it is not at all working.

You can't put $ signs in IDL programs, only use it from the command line.

> If I use spawn,'the above text' then error is coming like, illegal character in program text.

You are already using single quotes in the sed command. You can't just blindly but 'the above text' in single quotes because then it becomes
SPAWN, 'sed -i 's/jumbledymuck/g' progo_dark_limb0.pro'
and the s/jumbledymuck/ portion is no longer quoted at all. Use
SPAWN, "the above text"
with double quotes instead. It gets really fun (in a bad way) if your Unix command has both types of quotation marks.

Craig
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: running and compiling programs in different folder from main directory
Next Topic: histogram bin edges

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

Current Time: Wed Oct 08 15:21:14 PDT 2025

Total time taken to generate the page: 0.00472 seconds