123456789101112131415161718 |
- #!/bin/bash
- cont=false
- while [ $cont = false ]; do
- printf "Password:\t"
- read -s pass1
- printf "\nRepita Password:\t"
- read -s pass2
- printf "\n"
- if [ $pass1 = $pass2 ]; then
- pass=$pass1
- cont=true
- printf "Password correcto.\n"
- else
- printf "Password incorrecto. Intentelo de nuevo:\n"
- fi
- done
- unset cont pass pass1 pass2
|