lots: shellcheck, streaming stuff, fixes
[distro-setup] / vpn-static-ip
index bef79330f453bc4992f3267cc6e779f38b16d29c..8ecce1c8ce83aba53fc381fbc74e56ad47dd149b 100755 (executable)
@@ -15,7 +15,7 @@ conf=$1
 main() {
   while read -r host port; do
     while read -r ip; do
-      echo $ip | egrep '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*' &>/dev/null || continue
+      echo $ip | grep -E '[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*' &>/dev/null || continue
       printf "remote %s %s\n" "$ip" "$port" >>$conf
       ret=0
     done < <(timeout -s 9 1 dig +short $host ||:)