From 070833a312c130424a0b6ffe155b57bbb5a17f26 Mon Sep 17 00:00:00 2001 From: Karl Rister Date: Tue, 24 Oct 2023 14:46:32 -0500 Subject: [PATCH] switch egrep to 'grep -E' - newer versions of egrep emit messages about it being obsolete; this output can break us in some situations --- endpoints/base | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/endpoints/base b/endpoints/base index 4f40e4ee..71e4f80f 100755 --- a/endpoints/base +++ b/endpoints/base @@ -1051,9 +1051,9 @@ function process_roadblocks() { function is_ip() { local ip=$1; shift - if echo "$ip" | egrep --silent '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}'; then + if echo "$ip" | grep -E --silent '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}'; then return 0 - elif echo "$ip" | egrep --silent '[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]'; then + elif echo "$ip" | grep -E --silent '[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]{1,4}\:[[:xdigit:]]'; then return 0 else return 1