I'm trying to compare the content of two files and tell if the content of one is totally included in another (meaning if one file has three lines, A, B and C, can I find those three lines, in that order, in the second file). I've looked at diff
and grep
but wasn't able to find the relevant option (if any).
Examples:
file1.txt file2.txt <= should return true (file2 is included in file1)
--------- ---------
abc def
def ghi
ghi
jkl
file1.txt file2.txt <= should return false (file2 is not included in file1)
--------- ---------
abc abc
def ghi
ghi
jkl
Any idea?