Created
March 2, 2016 18:44
-
-
Save juliojsb/99c884b9cdf36953b455 to your computer and use it in GitHub Desktop.
Read password variable in bash without showing the typing in the terminal
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 | |
# Read password from terminal without showing it | |
# read -s disables echo | |
echo -n "Enter your password: " | |
read -s password | |
# Show the password | |
echo -e "\nThe password you entered before -> $password" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment