Advertisement
Guest User

Untitled

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