0

How can I delete the lines in a text file that exits in another text file? Like sorting, I pretty much want to clear that text file deleting the strings (lines) that are in the other file.

I try this :

#!/bin/bash
B=badwords.txt
while read line; do
grep -v "$line" allwords.txt > $$ && mv $$ goodwords.txt
done < $B

0 Answers0