Now we have uptime shorthand for seconds
This commit is contained in:
parent
5c7cb81c27
commit
06797de423
1 changed files with 3 additions and 1 deletions
4
fetch
4
fetch
|
@ -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# }
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue