Skip to content

Commit

Permalink
Merge pull request #424 from perftool-incubator/dev-kmr
Browse files Browse the repository at this point in the history
change '\:' to ':' in IPv6 validation grep
  • Loading branch information
k-rister authored Oct 30, 2023
2 parents 423d45b + 223325c commit 4642604
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion endpoints/base
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ function is_ip() {

if echo "$ip" | grep -E --silent '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}'; then
return 0
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
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
Expand Down

0 comments on commit 4642604

Please sign in to comment.