bash get password input code example
Example 1: read password bash
# -s parameter hides echo
read -p 'Type your password:' -s PASSWORD
Example 2: bash read username and password
read -s -p “Enter Password: ” pswd
# -s parameter hides echo
read -p 'Type your password:' -s PASSWORD
read -s -p “Enter Password: ” pswd