From 7ec516860a88311889436814c2576911120b2c45 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 9 Feb 2016 18:32:01 +1100 Subject: [PATCH] Replace broken BSD local ip cmd with a tested working one --- fetch | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fetch b/fetch index bbc7071a..3d4420d3 100755 --- a/fetch +++ b/fetch @@ -1356,8 +1356,7 @@ getlocalip () { ;; *"BSD") - localip="$(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' \ - | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1')" + localip="$(ifconfig | awk '/broadcast/ {print $2}')" ;; "Windows")