Update test.sh
This commit is contained in:
10
test.sh
10
test.sh
@@ -27,12 +27,12 @@ function show_time () {
|
||||
else ((hour=num)); fi; else ((min=num)); fi; else ((sec=num)); fi
|
||||
|
||||
t=''
|
||||
if [ $day != 0 ]; then t+="$day days "; fi
|
||||
if [ $hour != 0 ]; then t+="$hour hours "; fi
|
||||
if [ $min != 0 ]; then t+="$min mins "; fi
|
||||
if [ $sec != 0 ]; then t+="$sec secs "; fi
|
||||
if [ $day != 0 ]; then t+="${day}days, "; fi
|
||||
if [ $hour != 0 ]; then t+="${hour}hours, "; fi
|
||||
if [ $min != 0 ]; then t+="${min}mins, "; fi
|
||||
if [ $sec != 0 ]; then t+="${sec}secs, "; fi
|
||||
|
||||
echo $t
|
||||
echo ${v::-2}
|
||||
}
|
||||
|
||||
show_time ${1}
|
||||
Reference in New Issue
Block a user