I have the need to sort a string of numbers, so I came up with the Str2lst alias;
I use it thus;
Sorted;
Reverse sorted;
Ref: XSORT - Pipe fitting to copy stdin and file(s)...
Read more
Code:
R:\>which str2lst
str2lst is an alias : echo %@replace[ ,^n,%$]
I use it thus;
Code:
R:\>str2lst 1961 1210 2025 1995 1990
1961
1210
2025
1995
1990
Sorted;
Code:
R:\>str2lst 1961 1210 2025 1995 1990 | xsort /type=0
1210
1961
1990
1995
2025
Reverse sorted;
Code:
R:\>str2lst 1961 1210 2025 1995 1990 | xsort /type=0 /r
2025
1995
1990
1961
1210
Ref: XSORT - Pipe fitting to copy stdin and file(s)...
Read more