Below are two example file listings. I need to compare files of lists (of files) - the last "X" characters of each record to the right of the last "/".
If the file NAME is not found I need the entire row sent to a third file as output.
These are file listings, might be three files in the second listing,
two thousand in the first.
Two files not found in listing TWO that exist in listing ONE : "Competition.csv" (#4) and "daphinia.csv" (#6).
Sorting the files does not work, file paths can be very short or very long and multiple copies of files can be found in muliple directories.
Comm/diff/cmp produced unsatisfactory results as I'm only looking for the last 'X" number of characters (based on file name, extension) in the RIGHT of each row.
(In Microsfot EXCEL I would simply extract everything to the right of the last "/", row-by-row, save it to a another list and VLOOKUP that list with the first list.)
But this is not a Microsoft installation.
A script to awk in the contents of list (file) two, and search through list (file) one, output not matching to file three?
Also parsing out the directory names with sed and leaving only two lists of file names has been difficult - don't know what paths I'd be replacing as they would differ every time. I played around with cut, but the start of the file name could be anywhere from column 10 to column 150. My intuition is there has to be a way to isolate all characters to the right of that last "/" in the file path.
Then again, I could be wrong.