#!/bin/bash
cd /var/log
fil=$(mktemp)
stat -c "%y|%n" rpmpkgs-*.gz | grep `date --date="1 days ago" +%Y-%m-%d` | awk -F"|" '{print $2}' > $fil
for i in `cat $fil`;
do
/usr/bin/uuencode $i | mail -s "$i" youremail@example.com
done
rm $fil
Have a great day!