Created
September 29, 2017 01:30
-
-
Save paolooo/04cbf6c02fd831dcb3344fc4f2c71299 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
################################################ | |
# @author Nino Paolo Amarillento # | |
################################################ | |
# Usage : | |
# | |
# $ ./test-read.sh localhost root db_name | |
################################################ | |
[ $# -lt 3 ] && echo "Usage: $(basename $0) <DB_HOST> <DB_USER> <DB_NAME>" && exit 1 | |
HOST=$1 | |
USER=$2 | |
DB=$3 | |
echo "DB password: " | |
read -s DB_PASS | |
mysql -u $USER -h $HOST -p | |
stty echo $DB_PASS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment