The script is very simple but it executes only partially; have no clue as to what might be happening.
echo "Elija un # entre 1 y 12 para un mes"
read num_mes
case $num_mes in
1 echo $num_mes ---> Enero
2 echo $num_mes ---> Febrero
3 echo $num_mes ---> Marzo
4 echo $num_mes ---> Abril
5 echo $num_mes ---> Mayo
6 echo $num_mes ---> Junio
7 echo $num_mes ---> Julio
8 echo $num_mes ---> Agosto
9 echo $num_mes ---> Septiembre
10 echo $num_mes ---> Octubre
11 echo $num_mes ---> Noviembre
12 echo $num_mes ---> Diciembre
echo "No has seguido bien las instrucciones!"
esac
exit 0
The output of the above is:
echo "Elija un numero entre 1 y 12 para un mes"users-ibook-g4-667:Data user$ ./caselab-1.sh
Elija un # entre 1 y 12 para un mes
5
./caselab-1.sh: line 4: syntax error near unexpected token `echo'
./caselab-1.sh: line 4: ` 1 echo $num_mes ---> Enero'
users-ibook-g4-667:Data user$
read num_mes
case "$num_mes" in
"1") echo "$num_mes ---> Enero";;
"2") echo "$num_mes ---> Febrero";;
"3") echo "$num_mes ---> Marzo";;
"4") echo "$num_mes ---> Abril";;
"5") echo "$num_mes ---> Mayo";;
"6") echo "$num_mes ---> Junio";;
"7") echo "$num_mes ---> Julio";;
"8") echo "$num_mes ---> Agosto";;
"9") echo "$num_mes ---> Septiembre";;
"10") echo "$num_mes ---> Octubre";;
"11") echo "$num_mes ---> Noviembre";;
"12") echo "$num_mes ---> Diciembre';;
echo "No has seguido bien las instrucciones!";;
esac
exit 0
When running this version it gave me another error at line #16, probably due to ending it with "::" instead of a line-feed.
The thing is that the above results are coming from the iBook; if I go with the exact same scripts to Ubuntu Studio or Slacko it goes even a shorter distance from Start...
The file permissions are something that too gives some problems but those are manageable. Nonetheless, I'm certain that here's something very basic that's escaping my comprehension. If, taking into consideration those 3 scenarios established (Slacko & Ubuntu Studio, both virtualized, the iBook Gen 4), how to proceed in order to be able at least to debug scripts or still better, how to make scripts that are understandable by all three?
Thanks in advanced for any help on the above!
[/quote]