Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extract only nos from multiple lines 1

Status
Not open for further replies.

spookie

Programmer
May 30, 2001
655
IN
Hi All,
I have a file of following format.
Code:
2008/09/02 00:30:10 INFO> Feature.pm:181 - Processing Response for 01234 Feature FEAT_10 status A msg 
2008/09/02 00:30:10 DEBUG> Feature.pm:182 - Feat Seq 582269
2008/09/02 00:30:11 INFO> Feature.pm:191 -  Response FEAT_ERR_005
--
2008/09/02 00:30:11 INFO> Feature.pm:181 - Processing Response for 45678 Feature FEAT_02 status A msg 
2008/09/02 00:30:11 DEBUG> Feature.pm:182 - Feat Seq 584908
2008/09/02 00:30:11 INFO> Feature.pm:191 -  Response FEAT_ERR_005
...
...
I want to extract the output as
01234,582269
45678,584908
...
I can do it in PERL, reading file line by line and searching for a digit..(\b\d+\b). But i am curious how it can be achieved in AWK..preferably one liner :)

Thanks in advance.



--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
 
Perfect,Thanks..

--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top