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

[no subject]



For example, I have 25 MB Postfix log file which I've wrote a script that
extracts the IDs for a specific from <> address, then use fgrep to extract
the logs specific to that domain. 

That process takes about 5 minutes to process 17,000 unique IDs. 

If I use the -v invert, then it's another 5 minutes to generate a new list.
I figure that if fgrep scans a file line by line for a match, there would be
a way to process those that didn't match into another file to save time from
re-processing the script.

If there's not a utility to do this, I could write the procedure in Perl
that replicated what fgrep does, but I wanted to be sure that there isn't a
utility out there already.

Regards,
Jonathan Chum
Senior Developer

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AIS Media, Inc. - "Passion. Innovation. Expertise"
7000 Central Parkway, Suite 1700
Atlanta, GA 30328
Tel: 770.350.7998 / Fax: 770.350.9409
<a  rel="nofollow" href="http://www.aismedia.com";>http://www.aismedia.com</a> / jchum at aismedia.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

-----Original Message-----
From: ale-bounces at ale.org [<a  rel="nofollow" href="mailto:ale-bounces";>mailto:ale-bounces</a> at ale.org] On Behalf Of Greg
To: ale at ale.org
Freemyer
Sent: Thursday, December 22, 2005 2:16 PM
To: Atlanta Linux Enthusiasts
Subject: Re: [ale] FGrep matches and non matches to two seperate files

Are you just asking about &quot;fgrep -v&quot; ?

On 12/22/05, Jonathan Chum &lt;jchum at aismedia.com&gt; wrote:
&gt;
&gt;
&gt;
&gt; I have a list of PostFix IDs in a file that I'm able to fgrep the initial
&gt; maillog and return all entries matching the IDs in the list. I'd like to
&gt; create two files with it though, one that contains the new maillog that
&gt; matches the IDs listed in the file and another file that contains the old
&gt; maillog without these lines.
&gt;
&gt;
&gt;
&gt; Any idea how I would go about accomplishing this? Thanks.
&gt;
&gt;
&gt;
&gt; Regards,
&gt;  Jonathan Chum
&gt;  Senior Developer
&gt;
&gt;
&gt;  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&gt;  AIS Media, Inc. - &quot;Passion. Innovation. Expertise&quot;
&gt;  7000 Central Parkway, Suite 1700
&gt;  Atlanta, GA 30328
&gt;  Tel: 770.350.7998 / Fax: 770.350.9409
&gt;  <a  rel="nofollow" href="http://www.aismedia.com";>http://www.aismedia.com</a> / jchum at aismedia.com
&gt;  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&gt;
&gt;
&gt; _______________________________________________
&gt; Ale mailing list
&gt; Ale at ale.org
&gt; <a  rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale";>http://www.ale.org/mailman/listinfo/ale</a>
&gt;
&gt;


--
Greg Freemyer
The Norcross Group
Forensics for the 21st Century
_______________________________________________
Ale mailing list
Ale at ale.org
<a  rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale";>http://www.ale.org/mailman/listinfo/ale</a>



</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00322" href="msg00322.html">[ale] FGrep matches and non matches to two seperate files</a></strong>
<ul><li><em>From:</em> greg.freemyer at gmail.com (Greg Freemyer)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00320" href="msg00320.html">[ale] FGrep matches and non matches to two seperate files</a></strong>
<ul><li><em>From:</em> greg.freemyer at gmail.com (Greg Freemyer)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00320.html">[ale] FGrep matches and non matches to two seperate files</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00323.html">[ale] SuSE 10 &amp; Intel 536ep modem</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00320.html">[ale] FGrep matches and non matches to two seperate files</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00322.html">[ale] FGrep matches and non matches to two seperate files</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00321"><strong>Date</strong></a></li>
<li><a href="threads.html#00321"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

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