Skip to content

Instantly share code, notes, and snippets.

@paolooo
Created September 29, 2017 01:30
Show Gist options
  • Save paolooo/04cbf6c02fd831dcb3344fc4f2c71299 to your computer and use it in GitHub Desktop.
Save paolooo/04cbf6c02fd831dcb3344fc4f2c71299 to your computer and use it in GitHub Desktop.
#!/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