Guest User

Untitled

a guest
Jan 11th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. # $1 : description (ex, MYSQL DB Name)
  2. input_password() {
  3. tmp1=""
  4. while [ "$tmp1" = "" ]; do
  5. read -sp "Enter $1: " tmp1
  6. tty -s && echo >&2
  7. if [ -z tmp1 ]; then
  8. continue
  9. fi
  10.  
  11. read -sp "Confirm $1: " tmp2
  12. tty -s && echo >&2
  13. if [ "$tmp1" = "$tmp2" ]; then
  14. echo $tmp1
  15. return 0
  16. fi
  17. done
  18. }
  19.  
  20. echo `input_password "MYSQL Root Pass"`
  21. echo `input_password "MYSQL Root Pass2"`
Add Comment
Please, Sign In to add comment