There is no 'strip file extensions then compare' utility that I know of. You may have to make the data match for a diff utility to count it as a match.
Thank you for the prompt response guys!! I appreciate all your help!!
I must have been little clear on my requirement and output that I am expecting!!
I was writing a script to compare the files using sdiff or comp utility!! Before doing that I wanted the script to be generic where user can update a config file which expects the file name patterns (ex- file starts with 20170212 and end with .txt) This would be one set which I would call source. Similarly the config to be updated with file start and end patter for target. (ex- 20170213 and ends with .txt)
Without expecting users to do a mapping manual to do a comparison of these files. I would want to map them based on nearest match and run the comparison.
---------- Post updated at 12:34 PM ---------- Previous update was at 12:31 PM ----------
@RudiC- sorry for editing the original post!! It was for a reason!!
I'm new here and will ensure to use code tags wherever applicable..
Nearest match to me would be looking at some specific string in the file names that are common! Like the one I explained in above example..
While I am trying to work on a generic utility that can work across projects I do not want to create an additional filters to exclude and match!! Hope I was able to answer your query!!
If users are arbitrarily tagging things in filenames, this will be very difficult. I've fought this problem several times in various guises (similar filenames, similar company names, similar phone numbers..)
You can make solutions which work "mostly right" catching 98/100 so you can eyeball the rest, but you won't get it good enough to trust it to work without supervision. Anyone with an especially obnoxious work habit can throw it out of whack, too.