aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@krebs>2011-09-09 22:57:37 +0200
committerroot <root@krebs>2011-09-09 22:57:37 +0200
commita5335258dc9dfb1d990d0a52de7aa47f29a0f64d (patch)
treef253279deb4a30b4b49f7b1990f62b9bf59b3980
parent27d31204e1dff7222fa63e674b2f114fe6e7c38d (diff)
//Reaktor/commands/uptime: allow uptime < 1d
-rwxr-xr-xcommands/uptime3
1 files changed, 2 insertions, 1 deletions
diff --git a/commands/uptime b/commands/uptime
index def9bf4..7ff6416 100755
--- a/commands/uptime
+++ b/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
'