Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- alumnos=('pedro' 'juan' 'diego')
- index=0
- for alumno in ${alumnos[@]}
- do
- echo 'Asistio '$alumno'? :'
- read asistencia[$index]
- ((index++))
- # no se que queri hacer con la asistencia
- done
- index=0
- for alumno in ${alumnos[@]}
- do
- if [ ${asistencia[${index}]} -eq 0 ]; then
- echo $alumno' asistio'
- else
- echo $alumno' no asistio'
- fi
- ((index++))
- # no se que queri hacer con la asistencia
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement