[PC-BSD Commits] r22028 - pcbsd/current/src-sh/about

svn at pcbsd.org svn at pcbsd.org
Tue Apr 2 06:18:57 PDT 2013


Author: yurkis
Date: 2013-04-02 13:18:56 +0000 (Tue, 02 Apr 2013)
New Revision: 22028

Modified:
   pcbsd/current/src-sh/about/about
Log:
Some changes in uptime parsing

Modified: pcbsd/current/src-sh/about/about
===================================================================
--- pcbsd/current/src-sh/about/about	2013-04-02 10:55:59 UTC (rev 22027)
+++ pcbsd/current/src-sh/about/about	2013-04-02 13:18:56 UTC (rev 22028)
@@ -51,7 +51,7 @@
 echo "General info:"
 echo "       Host:..............`hostname`"
 echo "       User:..............`whoami`"
-echo "       Uptime:............`uptime | sed -E 's/^.+([0-9]+ days).+$/\1/'`"
+echo "       Uptime:............`uptime | uptime | awk '{sub(/^.* up +/,"");sub(/, *[0-9]+ users.*/,"");print}'`"
 echo "       FreeBSD ver:.......`uname -r`"
 echo "       Arch:..............`uname -m`"
 echo "       Kernel ident:......`uname -i`"



More information about the Commits mailing list