[code lang=“bash“]#!/bin/bash
# Vor wie viele Tagen lief GhettoVCB?
BACKLOG=1
echo „From: GhettoVCB
echo „To: ABC
echo „Subject: Datensicherung GhettoVCB“ >> /tmp/ghettovcb.$$
cat /var/log/ghettoVCB.log | grep -r ^`date –date=“$BACKLOG day ago“ +%Y-%m-%d` >> /tmp/ghettovcb.$$
echo >> /tmp/ghettovcb.$$
cat /var/log/ghettoVCB.log | grep -r ^`date –date=“$BACKLOG day ago“ +%Y-%m-%d` | grep Successfully >> /tmp/ghettovcb.$$
/usr/sbin/sendmail -t < /tmp/ghettovcb.$$ /bin/rm -f /tmp/ghettovcb.$$[/code]