I have 2 files and I want to find the difference and output only what is not inside ex2
grep -Ff ex2.txt ex1.txt, it shows me
a b c d, if I use the same command with
-v there is not output. Why with does the first command also output
What would be the easiest way to do this? Is grep suitable for this? Maybe diff maybe a script that would read each line and output if it's there or not?
cat ex1.txt a b c d cat ex2.txt a b c
Edit---my output shows up like this:
cat ex2.txt a b c cat ex1.txt a b c d grep -vf ex2.txt ex1.txt grep -f ex2.txt ex1.txt a b c d