summaryrefslogtreecommitdiff
path: root/nocompile/bin/hop0
blob: 7dc0812dc589ed0807e2685ba9ab2879241b4378 (plain) (blame)
1
2
3
4
5
6
#!/bin/sh
if [ "_$(uname -s)" != "_Linux" ];then
 /sbin/route -n get "$1" | grep "local addr" | cut -d: -f2 | tr -d ' '
else
 /sbin/ip r g "$1" | cut '-d ' -f8
fi