
Alguien me corrige este script?
Publicado por Tomas (13 intervenciones) el 04/03/2014 18:48:16
Me da error inesperado de sintaxis cerca del done. Linea 8(ultima)
hay un espacio al abrir y cerrar corchetes, y antes del ";then" por si no se ve bien.
1
2
3
4
5
6
7
8
#!/bin/bash
while read line ; do
echo "$line"
if [ "$line" -gt "0" ] ;then echo "$line" >> /home/alum1/f2.txt
elif [ "$line" -lt "0" ] ;then echo "$line" >> /home/alum1/f3.txt
if [ "$line" -eq "0" ] ;then echo "$line" >> /home/alum1/f2.txt
done < /home/alum1/f1.txt
Valora esta pregunta


0