From 505848a38ef8a755e0c2644d2502ddbc1d4d478a Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 9 Sep 2011 22:54:46 +0200 Subject: //Reaktor/commands/uptime: initial commit --- Reaktor/commands/uptime | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 Reaktor/commands/uptime (limited to 'Reaktor/commands/uptime') diff --git a/Reaktor/commands/uptime b/Reaktor/commands/uptime new file mode 100755 index 00000000..def9bf4f --- /dev/null +++ b/Reaktor/commands/uptime @@ -0,0 +1,7 @@ +#! /bin/sh +# +# //Reactor/commands/uptime - IRC-optimized uptime output +# +uptime | sed ' + s/^\(.*\) up \(.*\) days\?, *\(.*\), *\(.*\) users\?, *load average: \(.*\)$/\1; \2d \3; \4u; \5/ +' -- cgit v1.2.3 From 76e4b36e48c443e6777658092ea3daa194fdeb48 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 9 Sep 2011 22:57:37 +0200 Subject: //Reaktor/commands/uptime: allow uptime < 1d --- Reaktor/commands/uptime | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Reaktor/commands/uptime') diff --git a/Reaktor/commands/uptime b/Reaktor/commands/uptime index def9bf4f..7ff64168 100755 --- a/Reaktor/commands/uptime +++ b/Reaktor/commands/uptime @@ -3,5 +3,6 @@ # //Reactor/commands/uptime - IRC-optimized uptime output # uptime | sed ' - s/^\(.*\) up \(.*\) days\?, *\(.*\), *\(.*\) users\?, *load average: \(.*\)$/\1; \2d \3; \4u; \5/ + s/^\(.*\) up \(.*\) days\?, *\(.*\), *\(.*\) users\?, *load average: \(.*\)$/\1; \2d \3; \4u; \5/;t + s/^\(.*\) up *\(.*\), *\(.*\) users\?, *load average: \(.*\)$/\1; 0d \2; \3u; \4/;t ' -- cgit v1.2.3