6 old=/tmp/$( basename $file ).old
7 new=/tmp/$( basename $file ).new
8 log=/tmp/$( basename $file ).log
15 comm -1 -3 $old $new > $log
16 if [ $( stat -c %s $log ) -ne 0 ] ; then
17 curl --insecure https://monitor.planet-lab.org/monitor/uploadlogs --form "dir=$path" --form "log=@$log"
18 if [ $? -ne 0 ] ; then
19 # the upload has failed, so remove new file so no data is lost
20 rm -f /tmp/$( basename $file ).new
26 upload_log ~/.bash_eternal_history hist
27 #upload_log /var/log/secure hist