I am trying to find a way to predict if a text file is a subset of another..For example:foobaris a subset offoobarplutoWhile:fooplutoandfoobarare not one a subset of each other..Is there a way to automatically predict this?This check must be a cross check, and it has to return:file1 subset of file2 :    Truefile2 subset of file1 :    Trueotherwise             :    False
How to know if a text file is a subset of another
files;diff;text;file comparison;vimdiff
If those file contents are called file1, file2 and file3 in order of apearance then you can do it with the following one-liner: # python -c x=open('file1').read(); y=open('file2').read(); print x in y or y in x True # python -c x=open('file2').read(); y=open('file1').read(); print x in y or y in x True # python -c x=open('file1').read(); y=open('file3').read(); print x in y or y in x False