I currently have a directory of files that looks something like this:
abcd.txt
abcd_.txt
qrst.txt
qrst_.txt
wxyz.txt
wxyz_.txt
In theory, every line in abcde_.txt should be contained in abcd.txt, and every line in qrst_.txt should be contained in qrst.txt, and so on. While I have no problem comparing two files to test for this individually, I'm trying to find a more efficient way to do this for the entire directory.
In a case like this, if I had a lot of pairs of files, but I didn't know in advance what string of letters they'd each start with, is there a way to loop through and process each set of two related files at a time?