On Thu, Jan 30, 2020 at 06:07:51PM +0000, Adam Bower wrote:
On Thu, Jan 30, 2020 at 05:21:29PM +0000, Chris Green wrote:
You'd think this was easy but although I can find the information easily enough I can't find a concise way of doing it.
ip -o l | grep $(ip -o r | grep def | awk '{print $5}') | awk '{print $17}'
Something like that should do it. Although doesn't work well on systems with bonded network interfaces.
I like it! :-) It essentially does the bit I said was 'messy'. :-)
Thanks!