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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with sed and awk commands!!

Status
Not open for further replies.

rybread9

Technical User
Jul 19, 2007
1
US
Hi,

I am attempting to use awk and sed commands to retrieve certain portions of a line of text in a file.

****************************

Here is a short portion of the text file:

Update #000 - Initial installation/upgrade (contains all classes, routines, globals and crystal reports)

Update #001 - Patch #001 - This update resolves the error <MAXSTRING>GetRows1+14^GUIChartReview. This error can occur when an item within chart review contains a large number of entries.

*****************************

I would like for the script to retrieve only the lines that contain error codes, which for example would be the "<MAXSTRING>GetRows1+14^GUIChartReview" portion as well as displaying which update fixes this, in this case update #001.

The excess text other than "<MAXSTRING>GetRows1+14^GUIChartReview" and "Update #001" is not needed.

My hope is for this to display the information saved in a file in column format similar to:

Update# 001 "<MAXSTRING>GetRows1+14^GUIChartReview"
Update# <###> <"ERROR MESSAGE HERE">

Etc...


I am very new to this, and am unsure if this is the correct place to ask.

Any help is appreciated!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top