summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngar <ingar@osirion.org>2016-03-25 23:28:35 +0100
committerIngar <ingar@osirion.org>2016-03-25 23:28:35 +0100
commit8a6954e39c5c0e706724b6b80e956ba854f17b37 (patch)
tree2873233b2b1672762d2706aca32d5e59537f08f4
parent65eecef4edf0e04f3cd3219692b57481b5320e71 (diff)
parent38d0273e978a583fa01d23ffc61d3dee711598a9 (diff)
Merge pull request #1 from illwieckz/master
fix more than one day uptime print
-rwxr-xr-xsysinfo.sh2
1 files changed, 1 insertions, 1 deletions
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;}'`