Created
April 23, 2021 20:53
-
-
Save thanoskoutr/17bd26e5af13b45bf8345843142ea3ae to your computer and use it in GitHub Desktop.
A simple script to list all users in a Linux system.
This file contains 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
#!/bin/bash | |
if [[ "$1" == "-h" ]] ; then | |
echo "usage: `basename $0` [-h]" | |
echo "Prints all unix users." | |
exit 0 | |
fi | |
cut -d: -f1 /etc/passwd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment