On Mon, 2012-10-29 at 18:52 -0400, Neal Murphy wrote: > What's the '+100' supposed to do?
### Killall and Restore session started=$(date +%s) SECONDS=0 sleep 2 ### Time month=$(date +%B) mon=$(date +%b) d_y_t=$(date '+/%d/%Y %T') done=$(date +%s) done_2=$SECONDS ((seconds=(done-started)-(((done-started)/60)*60))) seconds="0$seconds" ### THIS EXPLAINS AND REPLACES THE +100 min_sec=$(((done-started)/60))":"${seconds: -2} echo echo "Attended time to restore session: $min_sec" echo -n "Session restored at " ; printf %9.9s $month ; echo $d_y_t echo ### THIS IS WHAT I LIKE THE BEST ((min=(done_2/60))) ; ((sec=(done_2%60))) echo printf "Attended time to restore session: %9d:%02d\n" $min $sec printf "Session restored at %9.9s%s\n" "$month" "$d_y_t" echo http://lists.debian.org/debian-user/2012/10/msg01286.html Regards, Ralf -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1351554170.1119.59.camel@localhost.localdomain