aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Beltran <ben@nsovocal.com>2019-12-23 00:43:22 +0100
committerBen Beltran <ben@nsovocal.com>2019-12-23 00:43:22 +0100
commit4f36c99380b27826970be983c0ce7c54f95b7b8b (patch)
treec854db2488bf4bc2205d0cc286ba7141451f95df
parenta9d35322bf518e716392bfc20a71800b9109ec52 (diff)
Add uptime function for tmux
-rw-r--r--functions/short-uptime.bash2
1 files changed, 2 insertions, 0 deletions
diff --git a/functions/short-uptime.bash b/functions/short-uptime.bash
new file mode 100644
index 0000000..62f5c09
--- /dev/null
+++ b/functions/short-uptime.bash
@@ -0,0 +1,2 @@
+#!/usr/bin/env bash
+uptime | awk '{print $(3)"d "$(5)" "$(NF+0)" "$(NF-1)" "$(NF-0)}'