Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # $1 : description (ex, MYSQL DB Name)
- input_password() {
- tmp1=""
- while [ "$tmp1" = "" ]; do
- read -sp "Enter $1: " tmp1
- tty -s && echo >&2
- if [ -z tmp1 ]; then
- continue
- fi
- read -sp "Confirm $1: " tmp2
- tty -s && echo >&2
- if [ "$tmp1" = "$tmp2" ]; then
- echo $tmp1
- return 0
- fi
- done
- }
- echo `input_password "MYSQL Root Pass"`
- echo `input_password "MYSQL Root Pass2"`
Add Comment
Please, Sign In to add comment