Thread
:
Grep Last Pattern Output
View Single Post
Sep 18th, 2004, 8:33 PM
#
3
erebus
Programmer
Join Date: Aug 2004
Location: /dev/null
Posts: 65
Rep Power:
5
Nice oneliner, bro. Overkill, but very nice... I could crank out an awk version, but it would be too similiar to that one, and it just does the job well enough. If you want it to run a little bit faster, try this:
(
Toggle Plain Text
)
$ grep "linux" foo | tail -1
$ grep "linux" foo | tail -1
__________________
<span style='font-size:14pt;line-height:100%'>
<span style='color:red'>"Political power grows out of the barrel of a gun" - Mao Tse-Tung</span>
</span>
erebus
View Public Profile
Visit erebus's homepage!
Find More Posts by erebus