The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
I want to print next 3 lines after pattern matching. naree Shell Programming and Scripting 12 05-21-2009 04:04 AM
counting the lines matching a pattern, in between two pattern, and generate a tab d.chauliac Shell Programming and Scripting 4 03-19-2009 01:30 PM
Perl script to match a pattern and print lines ammu Shell Programming and Scripting 6 12-22-2008 04:26 AM
Print block of lines matching a pattern vanand420 Shell Programming and Scripting 1 09-29-2008 06:09 AM
pattern matching and print with sed nymus7 Shell Programming and Scripting 2 04-14-2005 10:36 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 06-24-2009
shaliniyadav shaliniyadav is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 30
Thumbs up Script on pattern matching and print lines and export to excel

Hi Friends,

I am working on a script.. Looking forward for your expert help.....

My requirement is:

I have a text file where, need to search equip * RTF or end of line with RTF ,once this pattern is found then print 2nd line, 6th line, 7th line to a different file.
For Ex:

Code:
equip 1 RTF
FULL
BCCH
2 0
0
4 0 4 6 9 106 1353
75
255 255 255 255 255 255 255 255
5 5 5 5 5 5 5 5
0
2
0
0
3
3
0
equip 2 RTF
FULL
NON_BCCH
0 1
0
4 0 4 6 9 106 1351
80
0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1
0
0
2
1
0
1
0
OutPut will be
Code:
BCCH 4 0 4 6 9 106 1353 75
NON_BCCH 4 0 4 6 9 106 1351 80
so on.. Thr wil be many lines matching equip 1 RTF...

Regards
Shalini

Last edited by Yogesh Sawant; 06-29-2009 at 05:48 AM.. Reason: added code tags
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:37 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0