So my question is related to : diff where lines are mostly the same but out of order? but is slightly different, in that in this case sorting won't work.
I have 2 files and I want to do a diff between them, but as in the previous case the lines are out of order. Unlike the previous case though, the lines come in chunks of 5 and I want to make sure that these chunks are all the same. As an example, I'll do a two chunk line file difference
file1.txt 1a 2a 1b 2b file2.txt 1b 2b 1a 2a file3.txt 1a 1b 2a 2b
If we look at a diff between these files, all of them will come back as different. If we do a sort first and then a diff then we will again have all three files be the same. BUT for me file3.txt is not the same because the lines would come in pairs. So because we have 1a,2a in file1.txt and 1a,1b in file3.txt I'd want that marked as different.
Is there a nice/simple way to do this, or is creating a script going to be the only way to achieve this?