#!/bin/sh DAYS="${2:-4}" ## this script searches a bunch of paths to find logfiles, and then ## greps through the logfiles for matches (find /srv/bugs.debian.org/mail/ -iname '.logfile*' -ctime -$DAYS -print0; find /var/log/exim4/ -iname 'mainlog*' -ctime -$DAYS -print0; find /srv/bugs.debian.org/logs -iname 'spamscan*' -ctime -$DAYS -print0; find /srv/bugs.debian.org/logs -iname 'process*' -ctime -$DAYS -print0; )|xargs -0 grep -C 5 "$1"