Skip to content

Instantly share code, notes, and snippets.

@juliojsb
Created March 2, 2016 18:44
Show Gist options
  • Save juliojsb/99c884b9cdf36953b455 to your computer and use it in GitHub Desktop.
Save juliojsb/99c884b9cdf36953b455 to your computer and use it in GitHub Desktop.
Read password variable in bash without showing the typing in the terminal
#!/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