Reputation: 57
Ex: I have a text file
1.dog
2.cat
3.apple
4.bear
And I want to sort it to
3.apple
4.bear
2.cat
1.dog
I don't understand how to sort it because there is no space after the period and the first letter of the lines so I'm not able to simply say sort +1 file.txt or anything. Is there any way I can use some sort of substring to dodge the numbered list and period to sort it based on what comes afterwards?
Upvotes: 0
Views: 29