On Sun, 08 Dec 2002, Michael just had to get this off his chest:
Hello,
I like to get out of a log file all lines which are from 08.12.2002 *and* have the user 'michael'
grep 08.12.2002 /filename does the first half, how can I include there the grep for 'michael' ??
Thx Micha :-))
[..] 07.12.2002 19:41:49 21 2324 10773 0 1.0 michael 07.12.2002 19:42:49 21 2324 10773 0 1.0 michael 08.12.2002 19:43:49 21 2324 10773 0 1.0 michael 08.12.2002 19:44:49 21 2324 10773 0 1.0 michael 08.12.2002 19:45:49 21 2324 10773 0 1.0 tst 08.12.2002 19:46:49 21 2324 10773 0 1.0 tst [..]
$ grep '\(8.12.2002\).*michael' logfile 08.12.2002 19:43:49 21 2324 10773 0 1.0 michael 08.12.2002 19:44:49 21 2324 10773 0 1.0 michael $ awk '/(08.12.2002).*michael/ {print}' logfile 08.12.2002 19:43:49 21 2324 10773 0 1.0 michael 08.12.2002 19:44:49 21 2324 10773 0 1.0 michael Theo -- Theo v. Werkhoven Registered Linux user# 99872 http://counter.li.org ICBM 52 13 27N , 4 29 45E. SuSE 8.0 x86 Kernel k_Athlon 2.4.19-4GB See headers for PGP/GPG info.