in reply to Re^2: File content sorting based on type
in thread File content sorting based on type

Yes, you are quite correct about the input while loop!
I was thinking that there is some filtering or other actions that are not apparent from the OP's posted data. Whatever that other stuff is, it can be put inside the while loop. So this is kinda like a "place holder". But you are completely correct. The code that I wrote could be more compact.

And yes, a well written GRT will out perform other sorting options. True. However GRT (Guttman Rosler Transform) and ST (Schwartzian Transform) are advanced techniques that come after mastering basic sorting, which I don't think the OP has a solid handle upon yet. And in addition not every sort has to optimized to the nth degree.

We were both trying to be helpful. Whether or not this helped the OP remains to be seen. However, some posts have "teachable" moments past the current problem. Your post re: GRT may activate some other brain cells out there.

  • Comment on Re^3: File content sorting based on type