time_duration.sh: some monir changes..

This commit is contained in:
Christoph 2022-07-01 12:20:41 +02:00
parent bbed7cd985
commit 302fd34b89

View File

@ -18,11 +18,23 @@ function time_duration () {
local __t_s=`expr $__t_rest_h - $__t_m \\* 60`
if [[ $__t_h -gt 0 ]]; then
echo "$__t_h h : $__t_m min : $__t_s sec"
if [[ $__t_h -lt 10 ]] ; then
echo " $__t_h h : $__t_m min : $__t_s sec"
else
echo "$__t_h h : $__t_m min : $__t_s sec"
fi
elif [[ $__t_m -gt 0 ]]; then
echo "$__t_m min : $__t_s sec"
if [[ $__t_m -lt 10 ]] ; then
echo " $__t_m min : $__t_s sec"
else
echo "$__t_m min : $__t_s sec"
fi
else
echo "$__t_s sec"
if [[ $__t_s -lt 10 ]] ; then
echo " $__t_s sec"
else
echo "$__t_s sec"
fi
fi
else