From e464c04490c4f3e336a26af09a9794ed1b9bd70a Mon Sep 17 00:00:00 2001 From: korhadris Date: Sat, 22 Aug 2015 17:47:22 -0700 Subject: [PATCH] Ignore domains in ad lists that do not contain `.` characters. This will skip entries such as `localhost`, `android`, `debian` and empty lines as listed in #35. --- gravity.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gravity.sh b/gravity.sh index c6cd6b29..40f87ccf 100755 --- a/gravity.sh +++ b/gravity.sh @@ -70,7 +70,7 @@ do # This helps with that and makes it easier to read # It also helps with debugging so each stage of the script can be researched more in depth echo "$data" | awk 'NF {if ($1 !~ "#") { if (NF>1) {print $2} else {print $1}}}' | \ - sed -e 's/^[. \t]*//' -e 's/\.\.\+/./g' -e 's/[. \t]*$//' > $saveLocation + sed -e 's/^[. \t]*//' -e 's/\.\.\+/./g' -e 's/[. \t]*$//' | grep "\." > $saveLocation echo "Done." else echo "Skipping list because it does not have any new entries."