Uptime: Remove 'up'

This commit is contained in:
Dylan Araps 2016-10-27 09:45:55 +11:00
parent d5a16ee13e
commit 63198a2209

View file

@ -321,19 +321,17 @@ getuptime() {
uptime="${days:+$days, }${hours:+$hours, }${minutes}" uptime="${days:+$days, }${hours:+$hours, }${minutes}"
uptime="${uptime%', '}" uptime="${uptime%', '}"
uptime="up ${uptime:-${seconds} seconds}" uptime="${uptime:-${seconds} seconds}"
# Make the output of uptime smaller. # Make the output of uptime smaller.
case "$uptime_shorthand" in case "$uptime_shorthand" in
"on") "on")
uptime="${uptime/up }"
uptime="${uptime/minutes/mins}" uptime="${uptime/minutes/mins}"
uptime="${uptime/minute/min}" uptime="${uptime/minute/min}"
uptime="${uptime/seconds/secs}" uptime="${uptime/seconds/secs}"
;; ;;
"tiny") "tiny")
uptime="${uptime/up }"
uptime="${uptime/ days/d}" uptime="${uptime/ days/d}"
uptime="${uptime/ day/d}" uptime="${uptime/ day/d}"
uptime="${uptime/ hours/h}" uptime="${uptime/ hours/h}"