diff options
-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 |