Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- cat <<EOF
- Responda a la siguiente pregunta.
- Si no puede hacer nada escriba una
- frase" que contenga la cadena de
- caracteres 'No' y 'estoy'.
- Por ejemplo, 'No estoy' o 'No estoy en Madrid'.
- ES IMPORTANTE SEGUIR LAS INSTRUCCIONES.
- EOF
- for day in Jueves Viernes Sabado Domingo Lunes; do
- echo "Que haceis el ${day}?"
- read respuesta
- echo "$respuesta"|grep -qi 'no.*estoy'
- exit_code="$?"
- if [ "$exit_code" -ne "0" ]; then
- echo "$respuesta" > respuesta
- break
- fi
- done
- if [ "$exit_code" -eq "0" ]; then
- echo 'Nos vemos a la proxima entonces' > respuesta
- fi
- cat <<EOF
- Envie a Paula el file recien generado
- Bajo el nombre de: 'respuesta'.
- GRACIAS POR SU COLABORACION
- EOF
- exit 0
Add Comment
Please, Sign In to add comment