1
0
mirror of https://github.com/moparisthebest/pi-hole synced 2024-11-25 18:42:16 -05:00

Merge pull request #23 from rmceoin/master

Parses host only file formats now.
This commit is contained in:
Jacob Salmela 2015-07-16 21:44:41 -05:00
commit bfd536402c

View File

@ -68,7 +68,7 @@ do
# Most of the lists downloaded are already in hosts file format but the spacing/formating is not contigious
# 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 !~ "#") print $2}' > $saveLocation."$justDomainsExtension"
echo "$data" | awk 'NF {if ($1 !~ "#") { if (NF>1) {print $2} else {print $1}}}' > $saveLocation."$justDomainsExtension"
else
echo "Skipping $domain list because it does not have any new entries..."
fi