Re: centos 6.3, cron and mail script output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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@xxxxxxxxxxxxxxx
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux