The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
grep for a search string
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
grep for a search string
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
6
(
permalink
)
03-12-2008
radoulov
addict
Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 2,915
Quote:
Originally Posted by
raga
[...]
I want to grep one file for a search string and get the next 10 lines after the search string.
[...]
Code:
awk '/pattern/{c=11}c&&c--' file
radoulov
View Public Profile
Find all posts by radoulov
Find radoulov's past nominations received
Find radoulov's present nominations given