timestamp


PRINTF TIME

time1=$(date +%s)

code...

time2=$(date +%s)
secs=$((time2-time1))
printf 'job took %dd:%dh:%dm:%ds\n' $(($secs/86400)) $(($secs%86400/3600)) $(($secs%3600/60)) $(($secs%60))

EOF

Previous
Next