about summary refs log tree commit diff stats
path: root/bin/showwhoison
diff options
context:
space:
mode:
authorahriman <ahriman@falte.red>2019-03-26 22:46:26 +0000
committerahriman <ahriman@falte.red>2019-03-26 22:46:26 +0000
commit38f3b69c07ea9a9a73840693950c2a05271cc95e (patch)
tree79e645e1dc35a2b3ec3d07805917248fbf94b238 /bin/showwhoison
parent165868747c945aefad250a4173a4572131addbb3 (diff)
downloadadmin-38f3b69c07ea9a9a73840693950c2a05271cc95e.tar.gz
added two scripts to bin/
Diffstat (limited to 'bin/showwhoison')
-rwxr-xr-xbin/showwhoison11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/showwhoison b/bin/showwhoison
new file mode 100755
index 0000000..6c36584
--- /dev/null
+++ b/bin/showwhoison
@@ -0,0 +1,11 @@
+#!/usr/local/bin/bash
+
+# kneezle@tilde.institute
+# Shows connected users, including those
+# connected via mosh
+
+x=$(who | cut -d' ' -f1 )
+y=$(ps aux | grep mosh | cut -d' ' -f1)
+echo "Currently logged in users, including MOSH: "
+echo "$x" |sort | uniq
+echo "$y" | sort | uniq