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 #92798 is a reply to message #92794] Tue, 01 March 2016 07:39 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Tuesday, March 1, 2016 at 1:08:03 AM UTC-5, Sapna Mishra wrote:
> Hi wlandsman ,
> Is this code reads the contents of columns or it returns the no. of columns to be read???

Why don't you try it and find out yourself? (It does the same thing as your spawn to "awk".)

> If it is the case then my problem remains unsolved because i want to READ columns from a file without knowing how much column does this file has. Say If I have infinite number of columns And I want to read 100th column how would I do that, shall I need to give 100 parameters in Readcol?? This seems tough to me.

If your data is all numeric then the easiest thing is to use READ_ASCII

output = read_ascii('myfile.dat')

the output array will contain all the data. Then just select the column of the array you want.
[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 17:30:33 PDT 2025

Total time taken to generate the page: 0.00456 seconds