Finding intersection between two text files in windows cmd

command-line, file, windows

Solution

findstr /i /L /x /g:"File1.txt" "file2.txt"

should accomplish that quite nicely.

It finds all strings in file2 that `/x` exactly match `/L` literally `/i` but ignoring case `/g:file` strings in this file.

Problem

Is there any command on windows to find intersection between two text files? Example: ``` File1.txt File2.txt Apple Pie Banana Apple Pie ``` Output: ``` Pie Apple ```

Original source