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

Home » Public Forums » archive » Re: counting elements in files
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: counting elements in files [message #6610 is a reply to message #6609] Wed, 24 July 1996 00:00 Go to previous messageGo to previous message
Thomas A. McGlynn is currently offline  Thomas A. McGlynn
Messages: 23
Registered: March 1996
Junior Member
Andy Loughe wrote:
>
> Gideon Z Romm wrote:
>>
>> I have a file with a bunch of numbers stored in it, formatted. It looks
>> something like this:
>>
>> 2555 3456 4567 5678 6789 7890
>> 2345 6788 3445 6778 8899 9900
>> ..
>> ..
>> ..
>>
>> I am having trouble finding a procedure that will count the number of
>> elements in this file,
...
>> Gadi
>
> If the number of columns is fixed, why not use... cat filename | wc -l
> in an IDL spawn command, then multiply that by the number of columns
> you know to be in the file.
>
...
>
> Does this help, or am I way out in left field?
>
> --
> Andrew F. Loughe afl@cdc.noaa.gov

If you're going to use wc, you probably just want to use 'wc -w' to
count the words directly. Of course if you don't have wc it can
be a little more difficult. If the file is fixed format you may be
able to do a calculation based upon the size of the file.

Good luck,
Tom McGlynn
tam@silk.gsfc.nasa.gov
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Foreign fonts and map boundary problems in IDL
Next Topic: MacPPC IDL 4.0: TYLCT bug?

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

Current Time: Tue Dec 02 08:48:39 PST 2025

Total time taken to generate the page: 1.12189 seconds