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