Last active
May 7, 2019 02:28
-
-
Save o0-o/576663f36875761341f10731b3d2d20f to your computer and use it in GitHub Desktop.
[Users Logged In] Prints all users currently logged in #Shell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# users_loggedin.sh | |
w -h | | |
awk '{ print $1 }' 2>/dev/null || | |
exit 1 #failure | |
exit 0 #success |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment