Bash convert seconds to human readable
function displaytime { local T=$1 local D=$((T/60/60/24)) local H=$((T/60/60%24)) local M=$((T/60%60)) local S=$((T%60)) (( $D > 0 )) && printf ‘%d days ‘ $D (( $H > 0 )) && printf ‘%dRead More…
function displaytime { local T=$1 local D=$((T/60/60/24)) local H=$((T/60/60%24)) local M=$((T/60%60)) local S=$((T%60)) (( $D > 0 )) && printf ‘%d days ‘ $D (( $H > 0 )) && printf ‘%dRead More…