aboutsummaryrefslogtreecommitdiff
path: root/modules/hostname
diff options
context:
space:
mode:
authorManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-10-25 12:48:08 +0100
committerManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-10-25 12:48:08 +0100
commitfce557554a96236b9a19fa240938d1f66f80c8a8 (patch)
tree4ea252ce35aa6a2b6f8d618eab57c094382d8a14 /modules/hostname
parent570963e08c2b95b2ba0ba97dfed401dd0f06a4e3 (diff)
Added hostname module
Diffstat (limited to 'modules/hostname')
-rw-r--r--modules/hostname12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/hostname b/modules/hostname
new file mode 100644
index 0000000..41ec4fa
--- /dev/null
+++ b/modules/hostname
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# Prints USER@hostname
+
+PREFIX=' '
+
+get_hostname()
+{
+ echo "$PREFIX$USER@$(hostname)"
+}
+
+get_hostname