aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@xso>2011-09-09 22:54:46 +0200
committertv <tv@xso>2011-09-09 22:54:46 +0200
commit27d31204e1dff7222fa63e674b2f114fe6e7c38d (patch)
tree8880cd01837edc9f2e2057c95fe958aa34b9f555
parent6b4f6b79379b8bc0bf401e162a5f867837df81fe (diff)
//Reaktor/commands/uptime: initial commit
-rwxr-xr-xcommands/uptime7
l---------public_commands/uptime1
2 files changed, 8 insertions, 0 deletions
diff --git a/commands/uptime b/commands/uptime
new file mode 100755
index 0000000..def9bf4
--- /dev/null
+++ b/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/
+'
diff --git a/public_commands/uptime b/public_commands/uptime
new file mode 120000
index 0000000..ffe5fbd
--- /dev/null
+++ b/public_commands/uptime
@@ -0,0 +1 @@
+../commands/uptime \ No newline at end of file