The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Perl onliner to search the last line with an occurence of a pattern
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Directory
Register
Forum Rules
FAQ
Contribute
Members List
Search
Today's Posts
Mark Forums Read
Thread
:
Perl onliner to search the last line with an occurence of a pattern
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
01-30-2008
lucaswoods
Registered User
Join Date: Jan 2008
Posts: 9
perl
-ne 'while(<>) {if(/^cool/) { $x = $_; }} print $x;'
lucaswoods
View Public Profile
Find all posts by lucaswoods