for build small linux application I need to check the internet connectivity of the system. But my box have multiple network interfaces with interfaced for backup internet connection. I need to do some task based on main network connection lose the connectivity.
I used to chose interface using -i with ping command
ping -I eth0 x.x.x.x
but with this method i have to mention all the available interfaces on my application. Other than doing this is there any way to do something like this
ping -I !bkp0 x.x.x.x
basically I need to check the connectivity of all the links except backup link