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

log files

Status
Not open for further replies.

jo90

Programmer
Jun 19, 2002
30
0
0
GB
Hi,

Is it possible to be processing at certain point in a log file - and the skip to a previous point in the log file, such as a line containing 'word'? It doesn't matter where it occurs but must be before the current point.

Sorry if this doesn't make much since - I can post code if it helps...

Jo.
 
sed can probably handle what you want, check out the sed faq
and the section on labels.
If not, reading the file into an array and using gawk is another option.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top