I have two files. One file contains words as if it were a dictionary and another file contains records of Logs. I would like the file containing the information (Dictionaries) to be removed from the Log file. Remove the entire log line and not just the word.
Unsuccessful attempts:
grep -f dicionario.txt -v logs.txt
or
while read line; do egrep -v "$line" logs.txt; done < dicionario.txt >> filtrado.txt
The first command, generated this error:
grep: Refer▒ncia anterior inv▒lida
The second I believe he reads the list of dictionaries line by line and as he does not find the reference he saves in filtrate.txt. Thus the file filtered.txt is around 180 MB, while the original Log file has only 3 MB.
x.txt content
Aaroon NB / Inv. 8120403678
ABRIGO SALAS - RIFA DE MAIO 2018
Academia e fatura cartão
Acesso por celular
Adequate! I wish to talk.
Adesivos
adventurous, I wish to speak:-)
AIR CROSS
Aluguel Anderson - porto feliz
ANALISTA DE FOLHA PGTO SR
Andamento do seu pedido!
angel
angelic How so?
Log.txt
May 10 03:29:23 xxxxxxx[28161]: ID: xxxxx; IP: xxxxx; MSGID: <[email protected]>; X-UOL-SMTP: xxxx; SENDER: <[email protected]>; SUBJECT: Коммерческое предложение главному; URL: xxx.com.br;
Thank you.