From 5742bbe2cd6989706bf95b5b986ae0c912b01087 Mon Sep 17 00:00:00 2001 From: Ruben Mosblech Date: Sun, 15 Sep 2019 13:09:40 +0200 Subject: [PATCH] Fix sharkjack.sh Fix shark jack interface not getting detected. Grepping the ip and invert grepping (grep -v) the same ip cannot return anything (unless -A is set to greater than 1), thus $IFACE is always empty. --- sharkjack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sharkjack.sh b/sharkjack.sh index 3975fd1..98fb8de 100755 --- a/sharkjack.sh +++ b/sharkjack.sh @@ -72,7 +72,7 @@ function locate_interface_to_shark() { printf "\n%s" 'Waiting for a Shark Jack to be connected..' while [[ -z $IFACE ]]; do printf "%s" . - IFACE=$(ip route show to match 172.16.24.1 2>/dev/null| grep -i 172.16.24.1 | cut -d ' ' -f3 | grep -v 172.16.24.1) + IFACE=$(ip route show to match 172.16.24.1 2>/dev/null| grep -i 172.16.24.1 | cut -d ' ' -f3) sleep 1 done echo -e "\n"