Use sort -u instead of uniq as it is guaranteed to be safe when doing inline file operations.

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2019-12-12 10:17:54 +00:00
parent bd1b004d94
commit 570a7a5c11
No known key found for this signature in database
GPG key ID: 00135ACBD90B28DD

View file

@ -163,7 +163,7 @@ database_table_from_file() {
inputfile="${tmpFile}"
# Remove possible duplicates found in lower-quality adlists
uniq -u "${inputfile}" "${inputfile}"
sort -u -o "${inputfile}" "${inputfile}"
# Store domains in database table specified by ${table}
# Use printf as .mode and .import need to be on separate lines