Ver Mensaje Individual
  #11 (permalink)  
Antiguo 03/12/2010, 12:50
jferrero
Colaborador
 
Fecha de Ingreso: mayo-2006
Ubicación: Valladolid
Mensajes: 524
Antigüedad: 18 años
Puntos: 11
Respuesta: problema programcion shell if

Hay que leer un poquito más, el manual de Bash...

Código Bash:
Ver original
  1. #!/bin/bash
  2.  
  3. directorio='.'
  4.  
  5. IFS="
  6. "
  7.  
  8. for i in $(ls -la $directorio | egrep "^-")
  9. do
  10.         tamano=$(echo $i |awk '{ print $5 }')
  11.  
  12.         if [ $tamano lt 600 ]
  13.         then
  14.                 echo $i
  15.         fi
  16. done
__________________
JF^D Perl Programming en Español