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

Home » Public Forums » archive » Re: Get rid of unwanted lines.
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: Get rid of unwanted lines. [message #62329 is a reply to message #62328] Fri, 05 September 2008 12:36 Go to previous messageGo to previous message
mankoff is currently offline  mankoff
Messages: 131
Registered: March 2004
Senior Member
On Sep 5, 3:23 pm, xiao <littledd...@gmail.com> wrote:
> Hi~ everyone, i have some data like this:
>
>       1123.97      000      15.0600      000      271.850      000
>       000            000       000            000      000
> 000
>       1127.98      000      15.2800      000      270.650      000
>       000            000       000           000       000
> 000
>       1136.68      000      15.5100      000      269.300      000
>        000            000       000           000       000
> 000
>       1139.05      000      15.7500      000      267.860      000
>       000            000       000           000       000
> 000
>       000            000       000           000       000
> 000
>       000            000       000           000       000         000
>       000            000       000           000       000         000
>       1145.10      000      15.9900      000      266.410      000
>       1155.74      000      16.2300      000      265.010      000
>       1163.19      000      16.4500      000      263.700      000
> I want to delete these zero lines and write other lines to another
> file.  How can I fulfill this ?
> Anyone have good ideas?
>                       Thank you

Which zero lines? The ones that start with them and have nothing else,
or the ones that have a bnuch of zeros and spaces? Or both?

How about this, outside of IDL:

% grep [^0\ ] file_with_zeros > file_without_zeros

-k.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: weighting: irregular grid
Next Topic: Re: Matching Lats and Lons from two arrays

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

Current Time: Fri Oct 10 04:40:41 PDT 2025

Total time taken to generate the page: 0.87855 seconds