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

Home » Public Forums » archive » TRICKY TASK USING AWK
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: TRICKY TASK USING AWK [message #92790 is a reply to message #92789] Mon, 29 February 2016 08:07 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
Hello,

On 02/29/16 10:57, Sapna Mishra wrote:
> Hello,
>
> I am using this part of IDL
>
> for i=1,c do begin
> fnameo[i]='tmp'
> cmd ='awk -v var="$i" ''{print $var}'' ' + fname[i] + ' > ' + fnameo[i]
> spawn, cmd
> endfor
>
> where tmp is a new file i want to create, it is showing error fnameo[i] not exist.
> Where I am wrong???

I'm not an awk user so forgive the silly question, but what is the awk
command above supposed to do?

It seems pretty simple (despite my lack of awknowledge) - isn't there an
IDL way of doing what you want and skip using SPAWN altogether?

cheers,

paulv
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Looping through structures
Next Topic: Segmentation fault (core dumped)

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

Current Time: Wed Oct 08 19:28:16 PDT 2025

Total time taken to generate the page: 0.00650 seconds