Y
Hacker News
new
|
ask
|
show
|
jobs
by
mzi
1679 days ago
I'm on my phone but I think you can do this if you're using awk anyway:
netstat -rn -f inet | awk '/default/ {print $2;exit}'