I want to sort a text file in PowerShell. The text file is as follows:
name1 4
name2 2.3
name3 6.7
name4 5.1
I want to output this file as follows:
name3 6.7
name4 5.1
name1 4
name2 2.3
As you can see, it is ordered in descending order of the number associated with the name. How to do it?
source
share