mirror of
https://github.com/disposable-email-domains/disposable-email-domains.git
synced 2024-11-23 09:08:11 +08:00
17 lines
270 B
Bash
17 lines
270 B
Bash
|
#!/bin/bash
|
||
|
temp_file="temp.sort";
|
||
|
|
||
|
# Copy contents of second file into first file
|
||
|
# ensuring no duplicates.
|
||
|
while read p; do
|
||
|
if [ $(grep -w $p $2 | wc -l) -eq 0 ]; then
|
||
|
echo $p >> $2
|
||
|
fi
|
||
|
done < $1
|
||
|
|
||
|
sort $2 > $temp_file
|
||
|
cat $temp_file > $2
|
||
|
rm -f $temp_file
|
||
|
|
||
|
#end
|