Created
March 19, 2018 19:59
-
-
Save arrjay/a7e69745413babd3def7dddcef6f0eff to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
user="" | |
candidate="" | |
while [ -z "${user}" ] ; do | |
read -p "enter an existing username: " -r candidate | |
getent passwd "${candidate}" > /dev/null 2>&1 && user="${candidate}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment