choosing right sort algorithm

Hello,

I have a txt file with 5-6 thousands lines of data in format (e.g.)

Text 12345 Text 12:34:56

What would be your approach if you're asked to sort this lines with respect to second part (12345 in this examole). Is it good idea to create structures and then sort them and finaly rewrite file again. Maybe there is a clever way?

Also what sort algorithm woud you choose. I woud try with insertion sort and heap sort. In general what algorithm would be most suited for this example in your opinion?

Thanks