blocklists/append_ipv4: Added support for ips with CIDR notation

dehydrated
Felix Stupp 5 years ago
parent 0043d6255a
commit 8c69ef1611
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -5,7 +5,7 @@ set -euo pipefail;
LIST_FILE="$(dirname "$0")/ipv4.txt";
TMP_FILE="$(mktemp)";
IP_REGEX='(?<!\d)\d+(\.\d+){3}(?!\d)';
IP_REGEX='(?<!\d)\d+(\.\d+){3}(/\d+)?(?!\d)';
cat "$LIST_FILE" "$@" |
grep --only-matching --perl-regexp "$IP_REGEX" |

Loading…
Cancel
Save