summaryrefslogtreecommitdiff
path: root/nocompile
diff options
context:
space:
mode:
authorEpoch Qwert <epoch@53flpnlls43fcguy.onion>2014-11-28 04:40:12 -0600
committerEpoch Qwert <epoch@53flpnlls43fcguy.onion>2014-11-28 04:40:12 -0600
commit06327cbeb735d3e8592df3ce6f8cc8a80b461787 (patch)
tree110491ff0e0be42f6bb4276c475a48223968b345 /nocompile
parent6cb57dcf67bae63bdf7b68dd138e2e0061e3bfaa (diff)
downloadmisc-06327cbeb735d3e8592df3ce6f8cc8a80b461787.tar.gz
misc-06327cbeb735d3e8592df3ce6f8cc8a80b461787.zip
maybe fixed bug in ifout on Linux for some routes.
Diffstat (limited to 'nocompile')
-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