You can re-filter the output via a second grep. For example: cat filename.txt | grep 08.12.2002 | grep michael On Sunday 08 December 2002 21:45, Michael Hoeller wrote:
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 [..]
-- To err is human, but to forgive is beyond the scope of the Operating System... Αλέξανδρος Καρυπίδης Πανεπιστήμιο Θεσσαλίας Τμήμα Μηχ/κών Η/Υ, Τηλεπικοινωνιών & Δικτύων Alexandros Karypidis University of Thessaly Computer & Communications Engineering dept.