![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| grep for a particular pattern and remove few lines above top and bottom of the patter | fed.linuxgossip | Shell Programming and Scripting | 17 | 07-25-2008 08:29 AM |
| grep to show lines only after pattern | wannalearn | Shell Programming and Scripting | 5 | 10-09-2007 02:44 AM |
| Search file for pattern and grab some lines before pattern | frustrated1 | Shell Programming and Scripting | 2 | 12-22-2005 03:41 PM |
| Help required regarding Extracting lines from a file | google_ever | Shell Programming and Scripting | 1 | 10-12-2005 07:02 AM |
| grep - to exclude lines beginning with pattern | frustrated1 | Shell Programming and Scripting | 2 | 08-29-2005 07:18 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
grep required pattern and next 2 or 3 lines
dear ones
pl.kindly help me 1) how to print(grep) required pattern and following 2 or 3 lines. 2) grep required pattern(to print)+above 2 lines+below 2 or 3 lines.from a report file. ex: we have some report file kf askfjsk fksaj fk skf sjfksjd kff sjfkjs kf jskdjfklsd jfklsdf sdkfjsd fsd jkfsdja fkjsdklf jsdklfj klsdj fklsd jkfjsdkfj ksd jfksdjf 456015 jf sakjlf ksld flksdjklfj sakl jfklsdajklfj sdalfjsdj fksldjfls djfkl i want to print 456015 and next 1 or 2 lines in some cases. and 456015 + above one line +below 1 or 2 lines. |
| Bookmarks |
| Tags |
| sed |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|