I have a problem that (I think) require a bit of script-magic - not sure what would be best though...
I have one directory with lots pictures in different formats - jpg, gif, png, tiff and svg.
Some (not all!) of the png-and svg-files are in pairs - ie. one png and one svg version of the same image, both with the same filename, except that the suffix differs (eg. figleaf.png and figleaf.svg).
I need a script that will take the file-list (made by
ls), and remove the svg-version of all twins, leaving just the png-version. All other files (non twins) - including svg-files without a png-twin - should remain in the list (together with the png-version of the twins). Alternatively, a script that creates a list of all svg-files with a corresponding png-twin.
I think some of twins may have slight difference in between the versions - eg. figleaf.png and FigLeaf.svg - so it would be great if the script could be optionally changed to ignore the case of the letters.