I'm tringtrying to do simple grep and grep -v so I will get the lines from a.txt that exists onin b.txt and not in c.txt.
Example of 3 files
Example of 3 files
a.txt:
a
b
c
d
e
up.txt:
a.up
b.up
c.up
dw.txt:
a.dw
b.dw
Desired output:
c
I wrote the below code but the grep looks on the $(sed...) as one single line at a time and not as a whole:
sed 's/.up//' /tmp/b.txt | grep -f /tmp/a.txt | grep -vf $(sed 's/.dw//' /tmp/c.txt)