aboutsummaryrefslogtreecommitdiff
path: root/segments/uptime.sh
diff options
context:
space:
mode:
authorCody Hiar <chiar@hybridforge.com>2015-08-12 12:06:23 -0600
committerCody Hiar <chiar@hybridforge.com>2015-08-12 12:06:23 -0600
commit07fc2644a237187dd4c5680e88f4adadbf533603 (patch)
treebb6335e180df48c5a6f0b893312857d36ad470f7 /segments/uptime.sh
Initial commit of the working files
Diffstat (limited to 'segments/uptime.sh')
-rwxr-xr-xsegments/uptime.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/segments/uptime.sh b/segments/uptime.sh
new file mode 100755
index 0000000..276cfbe
--- /dev/null
+++ b/segments/uptime.sh
@@ -0,0 +1,6 @@
+# Prints the uptime.
+
+run_segment() {
+ uptime | grep -PZo "(?<=up )[^,]*"
+ return 0
+}