diff options
Diffstat (limited to 'nocompile/bin')
-rwxr-xr-x | nocompile/bin/ifout | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nocompile/bin/ifout b/nocompile/bin/ifout new file mode 100755 index 0000000..a922108 --- /dev/null +++ b/nocompile/bin/ifout @@ -0,0 +1,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 |