Advertisement
Guest User

Untitled

a guest
Aug 28th, 2014
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.44 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. alumnos=('pedro' 'juan' 'diego')
  4. index=0
  5. for alumno in ${alumnos[@]}
  6. do
  7.    echo 'Asistio '$alumno'? :'
  8.    read asistencia[$index]
  9.    ((index++))
  10.    # no se que queri hacer con la asistencia
  11. done
  12.  
  13.  
  14. index=0
  15. for alumno in ${alumnos[@]}
  16. do
  17.    if [ ${asistencia[${index}]} -eq 0 ]; then
  18.     echo $alumno' asistio'
  19.    else
  20.     echo $alumno' no asistio'
  21.   fi
  22.   ((index++))
  23.    # no se que queri hacer con la asistencia
  24. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement