LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 10-06-2008, 06:10 AM   #1
adidassharma
LQ Newbie
 
Registered: Sep 2008
Posts: 15

Rep: Reputation: 0
cutting rows having particular pattern


hi all
i hav patterns lik this in my file......the content is same, but onkly the values changes.......
thus ter r numb. of lines having these 3 lines in the file
i wan to get all those lines starting with ANALYTICAL SURFACE AREAand three lines below it......this shud satisfy whereevr the lenes are or the patterns are.......

ANALYTICAL SURFACE AREA :
Comp. probe_radius, reent, toric, contact SES SAS
0 11.200 3257.369 883.533 170.910 4311.812 12591.084
 
Old 10-06-2008, 07:02 AM   #2
burschik
Member
 
Registered: Jul 2008
Posts: 159

Rep: Reputation: 31
If I understand your question correctly (which is unlikely), then you could use

Code:
grep -A2 "ANALYTICAL SURFACE AREA" filename
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
printing pattern match and not whole line that matches pattern Avatar33 Programming 13 05-06-2009 06:17 AM
replace a text pattern with the reverse of another text pattern lothario Linux - Software 5 07-25-2008 02:43 PM
Column into rows bharatbsharma Programming 1 10-25-2007 02:23 AM
How to define # of rows in a table royeo Linux - Software 3 11-07-2006 06:52 PM
rows and columns digitalgravy Linux - General 2 03-16-2004 06:47 PM


All times are GMT -5. The time now is 12:48 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration