84669 personnes étudient
152542 personnes étudient
20005 personnes étudient
5487 personnes étudient
7821 personnes étudient
359900 personnes étudient
3350 personnes étudient
180660 personnes étudient
48569 personnes étudient
18603 personnes étudient
40936 personnes étudient
1549 personnes étudient
1183 personnes étudient
32909 personnes étudient
大家知道在Linux下,我们在进行排序时可以用sort -n来按照key的数值进行排序而不是字符串值排序,那么在Windows下面有类似sort -n的指令吗,只知道Windows下的sort /r等同于Linux的sort -r.
sort -n
sort /r
sort -r
虽然好像我回答的太晚了,不过,还是给你个也许你已经找到的类似方式吧。你可以使用powershell里的sort-Object命令来达到这个目的。
λ type a.txt 1 10 2 3 5 8 90 11
使用 type a.txt | sort-object -property {$_ -as [int]} 后:
λ type a.txt | sort-object -property {$_ -as [int]} 1 2 3 5 8 10 11 90
虽然好像我回答的太晚了,不过,还是给你个也许你已经找到的类似方式吧。
你可以使用powershell里的sort-Object命令来达到这个目的。
使用 type a.txt | sort-object -property {$_ -as [int]} 后: