I want to pipline cat output of file to a sed pattern. Suppose I have 2 files: color.txt and duplicate.txt. color.txt contain 3 colors: blue, green, red and duplicate.txt contains green. I want to use sed to delete green from color.txt file.
I try something like this:
cat duplicate.txt | sed "/$/d" < color.txt
Unfortunately, it doesn't work. Any suggestions how to do this?