aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBaitinq <30861839+Baitinq@users.noreply.github.com>2021-12-14 17:44:45 +0000
committerGitHub <noreply@github.com>2021-12-14 17:44:45 +0000
commita0cb7fddca5fba76c8c3d70cd9d265c1d16f888a (patch)
treee7b00c95d0472a122a523d039d8bdf5066b05eca /modules
parent0e8e7ab63d02f4c220532e1c6aa4da5843d748ed (diff)
parentd66e4af5a1aaf71b2cba40d30019583f0697f47c (diff)
Merge pull request #32 from dsymbol/master
Added username module
Diffstat (limited to 'modules')
-rwxr-xr-xmodules/username14
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/username b/modules/username
new file mode 100755
index 0000000..2527b37
--- /dev/null
+++ b/modules/username
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# Prints the effective username of the current user
+
+PREFIX=''
+
+get_username()
+{
+ USERNAME=$(whoami)
+
+ echo "$PREFIX $USERNAME"
+}
+
+get_username \ No newline at end of file