diff options
author | Tristan <steckbrief@geekmail.de> | 2023-09-06 12:56:24 +0200 |
---|---|---|
committer | Tristan <steckbrief@geekmail.de> | 2023-09-06 12:56:24 +0200 |
commit | 963ef048db822908030a5c1eea27c12e69a5bb60 (patch) | |
tree | 16d6f86d711b63e7b1b01e0363fdbbfbde14822d | |
parent | bd349219bffa254efb49919310de9b9a16af738d (diff) |
adds building of blockV6.list
-rwxr-xr-x | buildAdBlocklistv6.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/buildAdBlocklistv6.sh b/buildAdBlocklistv6.sh new file mode 100755 index 0000000..aa62fb9 --- /dev/null +++ b/buildAdBlocklistv6.sh @@ -0,0 +1,13 @@ +#!/bin/bash +awk -F'[\t ]+' '{ + if (!match($0, /^[\t ]*(#|$)/)) { + if (NF>=2 && length($2)) { + host=$2 + } else { + host=$1 + } + if (!match(host, /^(localhost|local|localhost.localdomain|ip6-localnet|ip6-localhost$)$/)) { + print "::1 " host + } + } +}' adlists/* | sort > blockV6.list |