I know how to use
grep to display every common line of two files. But how can I display only the largest common part, i. e. the most common lines in succession?
(If there are equally large common parts, I feel indifferent about which part will be displayed. Doesn't matter if first, last or undefined behavior. In my case, the largest common part will always be significantly larger than any other common part.)
A B C D E F G
A X D E F B C
Common parts are
DEF. The largest common part I'm looking for is
DEF with 3 lines in comparison to
BC with only 1 line and 2 lines.