[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



> Hey - I've got a basic question. I have a huge text file, and am looking to
>drop records based on what is found in the text string. If a record has the
>text "rs232", "slip", "decnet" or "VA-1" anywhere in it, I want to drop it.
>If not, I want to keep the record.  >

> Is there a simple string I can use to do this? 
> I'm not sure if I just want to run a search string, or go Perl - but either
> way, I have a huge filebut most of needs to be dropped.

Well the following egrep command should do the trick:

egrep -v "rs232|slip|decnet|VA-1" hugefile

Take a try with it and see how it works for you.

BAJ


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00404" href="msg00404.html">[ale] Flat file post-processing - drop records based on text string</a></strong>
<ul><li><em>From:</em> brucelists at bellsouth.net (brucelists at bellsouth.net)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00404.html">[ale] Flat file post-processing - drop records based on text string</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00406.html">[ale] Evolution 2.2.1.1</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00404.html">[ale] Flat file post-processing - drop records based on text string</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00418.html">[ale] Flat file post-processing - drop records based on text string</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00405"><strong>Date</strong></a></li>
<li><a href="threads.html#00405"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>