find the intersection of files on OSX

0

I have 4 files of text. I would like to find what's the same in these files and output it to another file. kinda like an intersection of 4 sets.

Content looks like this:

.somecss
.anothercss
.blabla

How can I achieve this? I am on a mac.

sanjihan

Posted 2016-10-24T10:03:32.507

Reputation: 571

Interesting hints here: http://askubuntu.com/questions/111495/how-to-diff-multiple-files-across-directories

– ayaio – 2016-11-18T14:27:26.590

Do you want the set of lines that is found in all 4 files? Are the files already sorted? How should duplicate lines be handled? – Camille Goudeseune – 2017-05-29T14:15:58.683

No answers