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