2 # Uso: ./enrutador.sh archivo.csv
8 c2=`echo "$line" | cut -d, -f2`
9 c3=`echo "$line" | cut -d, -f3`
10 c4=`echo "$line" | cut -d, -f4`
11 c5=`echo "$line" | cut -d, -f5`
12 c6=`echo "$line" | cut -d, -f6`
13 c7=`echo "$line" | cut -d, -f7`
15 if [ "$c6" = "*" ]; then
16 echo route add -net "$c2 netmask $c3 dev $c4 metric $c7"
17 route add -net "$c2" netmask "$c3" dev "$c4" metric "$c7"
19 echo route add -net "$c2 netmask $c3 dev $c4 gw $c6 metric $c7"
20 route add -net "$c2" netmask "$c3" dev "$c4" gw "$c6" metric "$c7"