in reply to Find the last item in a series of files

You need one hash. In one pass, store basename as key and the largest extension found so far as the corresponding value. At the end of that pass, the hash contains exactly what you want. All you have left to do is format it.
Bill
  • Comment on Re: Find the last item in a series of files