From 06797de42315ebe60fddac18b5e801e4b2707633 Mon Sep 17 00:00:00 2001 From: Tudor Date: Sun, 14 Feb 2016 15:50:24 +0200 Subject: [PATCH] Now we have uptime shorthand for seconds --- fetch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fetch b/fetch index 17f84b09..33cc98ef 100755 --- a/fetch +++ b/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# } ;;