Vielleicht kann man mein eigentliches Problem ja anders lösen.
Ich möchte ein Skript schreiben welches ein Log File ausliest und mir lediglich die Zeilen ausgibt, welches das aktuelle Datum enthält.
Mir geht es darum zu sehen ob clamav oder besser freshclam ein update gemacht hat und wie es ausgegangen ist.
Mein Logfile sieht so aus
Code:
Sat Mar 8 21:48:35 2008 -> --------------------------------------
Sat Mar 8 21:48:35 2008 -> freshclam daemon 0.92.1 (OS: linux-gnu, ARCH: i386, CPU: i686)
Sat Mar 8 21:48:35 2008 -> ClamAV update process started at Sat Mar 8 21:48:35 2008
Sat Mar 8 21:48:41 2008 -> main.cvd is up to date (version: 45, sigs: 169676, f-level: 21, builder: sven)
Sat Mar 8 21:48:41 2008 -> daily.inc is up to date (version: 6173, sigs: 56718, f-level: 26, builder: ccordes)
Sat Mar 8 21:48:41 2008 -> --------------------------------------
Sun Mar 9 09:48:40 2008 -> Received signal: wake up
Sun Mar 9 09:48:40 2008 -> ClamAV update process started at Sun Mar 9 09:48:40 2008
Sun Mar 9 09:48:40 2008 -> main.cvd is up to date (version: 45, sigs: 169676, f-level: 21, builder: sven)
Sun Mar 9 09:48:40 2008 -> Downloading daily-6174.cdiff [100%]
Sun Mar 9 09:48:41 2008 -> Downloading daily-6175.cdiff [100%]
Sun Mar 9 09:48:41 2008 -> Downloading daily-6176.cdiff [100%]
Sun Mar 9 09:48:41 2008 -> Downloading daily-6177.cdiff [100%]
Sun Mar 9 09:48:41 2008 -> Downloading daily-6178.cdiff [100%]
Sun Mar 9 09:48:41 2008 -> Downloading daily-6179.cdiff [100%]
Sun Mar 9 09:48:41 2008 -> Downloading daily-6180.cdiff [100%]
Sun Mar 9 09:48:41 2008 -> Downloading daily-6181.cdiff [100%]
Sun Mar 9 09:48:41 2008 -> daily.inc updated (version: 6181, sigs: 57701, f-level: 26, builder: ccordes)
Sun Mar 9 09:48:41 2008 -> Database updated (227377 signatures) from database.clamav.net (IP: 194.47.250.218)
Sun Mar 9 09:48:41 2008 -> Clamd successfully notified about the update.
Sun Mar 9 09:48:41 2008 -> --------------------------------------
Sun Mar 9 10:26:33 2008 -> --------------------------------------
Sun Mar 9 10:26:33 2008 -> freshclam daemon 0.92.1 (OS: linux-gnu, ARCH: i386, CPU: i686)
Sun Mar 9 10:26:33 2008 -> ClamAV update process started at Sun Mar 9 10:26:33 2008
Sun Mar 9 10:26:39 2008 -> main.cvd is up to date (version: 45, sigs: 169676, f-level: 21, builder: sven)
Sun Mar 9 10:26:39 2008 -> Downloading daily-6182.cdiff [100%]
Sun Mar 9 10:26:39 2008 -> daily.inc updated (version: 6182, sigs: 57708, f-level: 26, builder: ccordes)
Sun Mar 9 10:26:39 2008 -> Database updated (227384 signatures) from database.clamav.net (IP: 65.120.238.5)
Sun Mar 9 10:26:39 2008 -> Clamd successfully notified about the update.
Lesezeichen