Given a large list of files, containing the following:
FILE1.doc
FILE1.pdf
FILE2.doc
FILE3.doc
FILE3.pdf
FILE4.doc
Is there a terminal command that would allow me to remove all files that do not have a duplicate name in the list? In this case...FILE2.doc and FILE4.doc?
FILE.doc\nFILE1.pdf
? Any of the newlines can be part of a file name. – Anthon Jul 16 '15 at 06:10