I have a directory with many image files in different formats. I'd like to see a list of all distinct file endings in that directory, so that I can see what kind of image formats are present. So assuming there would be only
jpg files, my desired output would look like:
png gif jpg
I know how to get a list of all file endings using
cut, but I don't know how to make that contain only unique entries. Is there a way to do this using only shell tools, or do I have to write a small python script or similar?