aboutsummaryrefslogtreecommitdiffstats
path: root/bin/get_load
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2016-03-11 10:42:47 +0100
committerDavid Runge <dave@sleepmap.de>2016-03-11 10:42:47 +0100
commit811fa21a9df0c136cafab935b6882b7541a22203 (patch)
tree939e14e8137940ea343f787d93a3c2fd77574b30 /bin/get_load
parent5c859c1a873d5be412926ce5b06426791b5e78a0 (diff)
downloaddotfiles-811fa21a9df0c136cafab935b6882b7541a22203.tar.gz
dotfiles-811fa21a9df0c136cafab935b6882b7541a22203.tar.bz2
dotfiles-811fa21a9df0c136cafab935b6882b7541a22203.tar.xz
dotfiles-811fa21a9df0c136cafab935b6882b7541a22203.zip
bin/get_*: Adding helper scripts to be used in tmux.
Diffstat (limited to 'bin/get_load')
-rwxr-xr-xbin/get_load8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/get_load b/bin/get_load
new file mode 100755
index 0000000..7991d26
--- /dev/null
+++ b/bin/get_load
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+set -euo pipefail
+IFS=$'\n\t'
+
+uptime_output=$(uptime| cut -d',' -f4,5,6|cut -d':' -f2)
+uptime_output=${uptime_output#" "}
+
+echo "$uptime_output"