diff --git a/gravity-adv.sh b/gravity-adv.sh index b024ec3..468d8d0 100755 --- a/gravity-adv.sh +++ b/gravity-adv.sh @@ -27,7 +27,7 @@ curl -A 'Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0' - # Sort the aggregated results and remove any duplicates echo "Removing duplicates and formatting to address=//"$piholeIP -cat /tmp/matter.txt | sort | uniq | sed '/^$/d' | awk -v "IP=$piholeIP" '{sub(/\r$/,""); print "address=/"$0"/"IP}' > /tmp/andLight.txt +cat /tmp/matter.txt | sed $'s/\r$//' | sort | uniq | sed '/^$/d' | awk -v "IP=$piholeIP" '{sub(/\r$/,""); print "address=/"$0"/"IP}' > /tmp/andLight.txt # Count how many domains were added so it can be displayed to the user numberOfAdsBlocked=$(cat /tmp/andLight.txt | wc -l | sed 's/^[ \t]*//')