From 38d0273e978a583fa01d23ffc61d3dee711598a9 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Fri, 25 Mar 2016 22:53:20 +0100 Subject: fix more than one day uptime print --- sysinfo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysinfo.sh b/sysinfo.sh index 5c239a5..db7abdf 100755 --- a/sysinfo.sh +++ b/sysinfo.sh @@ -6,7 +6,7 @@ #--- [ OS ] --------------------------- host=`uname -n` os=`uname -sr` -uptime=`uptime | rev | cut -d "," -f 5-| rev | cut -d "p" -f 2- | sed 's/^ *//' | sed 's/ */ /g'` +uptime=`uptime | sed -e 's/[ ][ ]*/ /g;s/ [0-9:]* up \(.*\), [0-9]* users.*/\1/'` #--- [ MEMORY ] ----------------------- mem_total=`cat /proc/meminfo | grep -i MemTotal | awk '{printf "%d",$2/1024;}'` -- cgit v1.2.3