Fix comma issues

This commit is contained in:
Dylan 2016-04-29 10:08:56 +10:00
parent cec15d9fb2
commit f1cc911e02

View file

@ -590,20 +590,20 @@ getuptime () {
hours=$((uptime / 3600%24)) hours=$((uptime / 3600%24))
days=$((uptime / 86400)) days=$((uptime / 86400))
days=" $days days," days=" $days days"
hours=" $hours hours," hours=", $hours hours"
mins=" $mins minutes" mins=", $mins minutes"
days=${days/ 0 days,} days=${days/ 0 days}
days=${days/ 1 days/ 1 day} days=${days/, 1 days/, 1 day}
hours=${hours/ 0 hours,} hours=${hours/, 0 hours}
hours=${hours/ 1 hours/ 1 hour} hours=${hours/, 1 hours/, 1 hour}
mins=${mins/ 0 minutes} mins=${mins/, 0 minutes}
mins=${mins/ 1 minutes/ 1 minute} mins=${mins/, 1 minutes/, 1 minute}
uptime="up${days}${hours}${mins}" uptime="up ${days}${hours}${mins}"
;; ;;
esac esac