myip=$(ip -f inet -o addr show eth1|cut -d\ -f 7 | cut -d/ -f 1)
route add default gw $myip
Asignar la dirección ip de una máquina a una variable en bash
Responder
myip=$(ip -f inet -o addr show eth1|cut -d\ -f 7 | cut -d/ -f 1)
route add default gw $myip