#!/bin/bash #Guardamos un numero aleatorio entre 0 y 9 n=$(($RANDOM%10)) if [ $# -lt 1 ] then echo "Error: ingrese como parametro un numero de 0 a 9" exit 10 fi if [ $n -eq $1 ] then echo "Acerto" exit 0 else echo "No acerto, el numero era $n" exit 11 #Es discutible si se trata de un fracaso... fi