summaryrefslogtreecommitdiff
path: root/nocompile/bin/ifout
diff options
context:
space:
mode:
Diffstat (limited to 'nocompile/bin/ifout')
-rwxr-xr-xnocompile/bin/ifout2
1 files changed, 1 insertions, 1 deletions
diff --git a/nocompile/bin/ifout b/nocompile/bin/ifout
index a922108..0884d3c 100755
--- a/nocompile/bin/ifout
+++ b/nocompile/bin/ifout
@@ -2,5 +2,5 @@
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
+ /sbin/ip r g "$1" | tr ' ' '\n' | grep -A1 '^dev$' | tail -n1
fi