I've been browsing around and trying to find the answer - bonus points for doing this in the shortest number of characters.
So I have file1.ex1 file2.ex1 file1.ex2 but no file2.ex2
I want to delete all the ex1 files, but only if ex2 version exists first.
So I assume this means I need to get a directory listing of all files ending in the extension I want to keep, piping that through and searching for which ones match the first part of the filename, then piping that into a delete command.
I want to use standard linux fu as I'm doing this on unraid.
I know this is easy for most of you, which is why I added to do it in least number of characters for a challenge! Oh, and this should work in all subdirectories matching to whatever is in that subdirectory only.