Inerative program to process the list of duplicates produced by 'duplicate'