[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
> Robert> Has anyone seen or written a script that will extract the
> Robert> lines from a log between a specified start and stop
> Robert> time/string?
> perl -lne 'print if /start/../end/' foo
Looks like the optimum solution.
One could use awk or sed if one wanted to be old fashioned.
> Replace `start' and `end' to taste (minding any regex
> metacharacters, of course).
> --
> Fletch | "If you find my answers frightening, __`'/|
> fletch at phydeaux.org | Vincent, you should cease askin' \ o.O'
> | scary questions." -- Jules =(___)=
> | U
Bob Toxen
bob at verysecurelinux.com [Please use for email to me]
<a rel="nofollow" href="http://www.verysecurelinux.com">http://www.verysecurelinux.com</a> [Network&Linux/Unix security consulting]
<a rel="nofollow" href="http://www.realworldlinuxsecurity.com">http://www.realworldlinuxsecurity.com</a> [My book:"Real World Linux Security 2/e"]
Quality Linux & UNIX security and SysAdmin & software consulting since 1990.
"Microsoft: Unsafe at any clock speed!"
-- Bob Toxen 10/03/2002
</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="00985" href="msg00985.html">[ale] extract lines from a log between a specified start and stop time?</a></strong>
<ul><li><em>From:</em> RGibson at Lithonia.com (Gibson, Robert H.)</li></ul></li>
<li><strong><a name="01005" href="msg01005.html">[ale] extract lines from a log between a specified start and stop time?</a></strong>
<ul><li><em>From:</em> fletch at phydeaux.org (Fletch)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg01014.html">[ale] [OT]FreeBSD Resources</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg01020.html">[ale] [OT]FreeBSD Resources</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg01005.html">[ale] extract lines from a log between a specified start and stop time?</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00988.html">[ale] Are autoeject floppy drives available for linux??</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#01015"><strong>Date</strong></a></li>
<li><a href="threads.html#01015"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>