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
Extract specific pattern from a file athreyavc Shell Programming and Scripting 4 11-12-2008 04:35 AM
pattern extract priyam Shell Programming and Scripting 6 10-20-2008 11:15 AM
extract field of characters after a specific pattern - using UNIX shell script jansat HP-UX 2 05-28-2008 01:08 AM
Extract the Pattern aajan UNIX for Dummies Questions & Answers 6 08-08-2007 05:47 AM
Please help! Sed extract a pattern zhen Shell Programming and Scripting 11 09-18-2006 01:36 PM

 
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 01-04-2009
techychap techychap is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 5
Need to extract specific pattern from logfile

Log File:

Attempting to contact (DESCRIPTION=(SOURCE_ROUTE=OFF)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname1.com)(PORT=1521)) )(CONNECT_DATA=(SID=database1)(SRVR=DEDICATED)))

Attempting to contact (DESCRIPTION=(SOURCE_ROUTE=OFF)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname2.com)(PORT=1521)) )(CONNECT_DATA=(SID=database2)(SRVR=DEDICATED)))

Attempting to contact (DESCRIPTION_LIST=(DESCRIPTION=(SOURCE_ROUTE=OFF)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname 3.com)(PORT=1521)))(CONNECT_DATA=(SID=database3)(SRVR=DEDICATED)))(DESCRIPTION=(SOURCE_ROUTE=OFF)(AD DRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname3.com)(PORT=1522)))(CONNECT_DATA=(SID=database3)(SRV R=DEDICATED))))

Attempting to contact (DESCRIPTION_LIST=(DESCRIPTION=(SOURCE_ROUTE=OFF)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname 4.com)(PORT=1521)))(CONNECT_DATA=(SID=database4)(SRVR=DEDICATED)))(DESCRIPTION=(SOURCE_ROUTE=OFF)(AD DRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname4.com)(PORT=1522)))(CONNECT_DATA=(SID=database4)(SRV R=DEDICATED))))

I need output like below: I have tried regular expression /awk -- not able to get expected output (below one)

HoST PORT SID
hostname1.com 1521 database1
hostname2.com 1521 database2
hostname3.com 1522 database3
hostname4.com 1522 database4

Can someone please help me on this?
 

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 06:43 PM.


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