In Ubuntu (the latest distro is fine), I want to reboot a router and inside a bash script I\'d like to have a command that waits for the network link to be up again and, whe
If you want a command to check if the link is up or down use ip :
ip
ip addr show eth0 | grep -Po "(?<=state ).*?(?=\s)" DOWN ip addr show wlan0 | grep -Po "(?<=state ).*?(?=\s)" UP