From Joe Wronkowski on 23 Oct 1998
Hi Jim,
I was just wondering if there was an easy way to grab the
time/date Oct 6 21:57:33 from the same line the
153.37.55.** was taken from.
If you are busy I understand.
Thanks
Joe Wronkowski
The following awk expression will isolate the date and time from these example lines:
date="$1 $2"
time="$3"
sample of log file:
Oct 6 21:50:19 rogueserver in.telnetd[197]: connect from 208.224.174.21 Oct 6 21:50:24 rogueserver telnetd[197]: ttloop: peer died: Success Oct 6 21:55:29 rogueserver in.telnetd[211]: connect from 208.224.174.21 Oct 6 21:55:35 rogueserver telnetd[211]: ttloop: peer died: Success Oct 6 21:57:33 rogueserver in.pop3d[215]: connect from 153.37.55.65 Oct 6 21:57:34 rogueserver in.pop3d[215]: Servicing request for rogue
apache | current | digi | ether | goodtimes | intlX | largedisk | |
maybe | numlock | quota | recovery | script | serial | session | |
sound | tape | testsuite | w95ie | w95ras | w95virus | xdm |