[CentOS] centos 6.3, cron and mail script output
Philippe Naudin
philippe.naudin at supagro.inra.fr
Fri Nov 23 09:49:31 UTC 2012
Le ven. 23 nov. 2012 10:42:19 CET, Philippe Naudin a écrit:
> ...
> rsync ...options... 2>&1 > LOGFILE
> echo -e "finished pushing to the backup \n$LOGFILE"
Nonsense, sorry.
If the output is short, you can do :
LOGS=$(rsync ... 2>&1)
echo -e "finished pushing to the backup \n$LOGS"
I you expect longer output :
rsync ...options... 2>&1 > LOGFILE
echo -e "finished pushing to the backup"
cat LOGFILE
--
Philippe Naudin
UMR MISTEA : Mathématiques, Informatique et STatistique pour
l'Environnement et l'Agronomie
INRA, bâtiment 29 - 2 place Viala - 34060 Montpellier cedex 2
tél: 04.99.61.26.34, fax: 04.99.61.29.03, mél: naudin at supagro.inra.fr
More information about the CentOS
mailing list