79658586

Date: 2025-06-09 08:31:15
Score: 1
Natty:
Report link

I need this too,
just a small modification to your proposal

def_interface=$(ip route get 1.1.1.1 | head -1 | cut -d ' ' -f 5)  
ip  addr show $def_interface | fgrep 'inet ' | awk '//  {print $2}'

use fisrt command to isolate active interface

Reasons:
  • Blacklisted phrase (0.5): I need
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Diego Scaravaggi