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!

Print all lines until reach specific phrase, then ignore rest of lines 1

Status
Not open for further replies.

Ternion

MIS
Aug 13, 2003
16
US
I'm trying to parse a BackupExec log file to simplify it down to just the system name and the amount backed up. I can grep out the needed lines, but the file also has the "verify" lines as well, which I don't need to see. How can I use awk (or something else) to print out everything that it reads until it reaches the phrase "Job Operation - Verify", then exit or just ignore the rest of the log file.

thanks for any help!
Scott
saw@ternion.com
 
Something like

{print}
/Job Operation - Verify/{exit}


CaKiwi
 
Thank you CaKiwi, that worked great! I knew there had to be a way for awk to work like that.

thanks again,
Scott
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top