Now we have uptime shorthand for seconds

This commit is contained in:
Tudor 2016-02-14 15:50:24 +02:00
parent 5c7cb81c27
commit 06797de423

4
fetch
View file

@ -527,7 +527,7 @@ getuptime () {
*)
uptime="$(uptime -p)"
[ "$uptime" == "up " ] && uptime="up $(cat /proc/uptime | cut -d'.' -f1) seconds"
[ "$uptime" == "up " ] && uptime="up $(awk -F'.' '{print $1}') seconds"
;;
esac
;;
@ -583,6 +583,7 @@ getuptime () {
uptime=${uptime/up}
uptime=${uptime/minutes/mins}
uptime=${uptime/minute/min}
uptime=${uptime/seconds/secs}
uptime=${uptime# }
;;
@ -594,6 +595,7 @@ getuptime () {
uptime=${uptime/ hour/h}
uptime=${uptime/ minutes/m}
uptime=${uptime/ minute/m}
uptime=${uptime/ seconds/s}
uptime=${uptime/,}
uptime=${uptime# }
;;