From 0a2fa2b55886adb7f1ed830e8554f6342c53fbc8 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 28 Aug 2016 12:03:23 +1000 Subject: [PATCH] Better uptime command that will work accross uptime versions --- neofetch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 6488eed1..848393be 100755 --- a/neofetch +++ b/neofetch @@ -238,7 +238,10 @@ getuptime() { ;; "Android"*) - uptime=$(uptime | awk -F ': |, ' '{printf $2}') + uptime=$(uptime | awk -F ' up' '{print $2}') + time="${time//[0-9] user*}" + time="${time//load average:*}" + time="${time%,*} ${time##*,}" ;; *)