Commit e28e66dc authored by Leo Leung's avatar Leo Leung
Browse files

tee properly to mail and stdout

parent de64f914
......@@ -14,11 +14,11 @@ fi
StartTime=$(date +%s)
if [ -b /dev/sda ] ; then
(sh start.sh sda | tee /dev/pts/0 | mail -s "Backup process report" leo@steamr.com) &
(sh start.sh sda | tee >(mail -s "Backup process report" leo@steamr.com)) &
fi
if [ -b /dev/sdb ] ; then
(sh start.sh sdb | tee /dev/pts/0 | mail -s "Backup process report" leo@steamr.com) &
(sh start.sh sdb | tee >(mail -s "Backup process report" leo@steamr.com)) &
fi
wait
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment