diff options
author | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2019-10-25 12:48:08 +0100 |
---|---|---|
committer | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2019-10-25 12:48:08 +0100 |
commit | fce557554a96236b9a19fa240938d1f66f80c8a8 (patch) | |
tree | 4ea252ce35aa6a2b6f8d618eab57c094382d8a14 /modules | |
parent | 570963e08c2b95b2ba0ba97dfed401dd0f06a4e3 (diff) |
Added hostname module
Diffstat (limited to 'modules')
-rw-r--r-- | modules/hostname | 12 |
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 |