Check whitelist on merger.sh

This commit is contained in:
columndeeply
2022-09-02 20:16:20 +02:00
parent 5c5ece45c3
commit ebb506fc2b

View File

@ -4,6 +4,9 @@
## sh merger.sh "*_clean"
#
# If no parameters given exit
[ $# -eq 0 ] && exit
# Remove temp file from previous runs if needed
rm -f merged.tmp
@ -21,6 +24,10 @@ rm -f ../hosts*
# Remove duplicates
sort < merged.tmp | uniq > merged
# Check whitelist and remove matches
comm -2 -3 merged ../whitelist > merged2
mv merged2 merged
# Split the merged file into 90MB chunks to avoid GitHub's limit
split merged hosts -C 90MB -d