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!

awk log file script

Status
Not open for further replies.

lambros

Programmer
Oct 10, 2002
42
0
0
US
Hi,

I have written an awk script to go through a log file, pick out items such as invalid user ID etc based on time stamp - it works to a point, however if there is a difference in 1 second in time between the user authenticating and trying to authenticate it throws out the script.

I can get the time - however would it be possible to use something like

{
if ( $0 ~ /time - 1 second/ )
lines2skip= do to next line
for (i=1; i <= lines2skip; i++)
getline
print
}

anyone know how to modify this? Sorry if this is somewhat vague....

Lambros.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top