SC formatlist: sorting multi-dot numbers
Posted: 15 Nov 2016 21:29
FYI
I share this "Did you know" only because it took me a couple of time to find the obvious (*) format configuration).
To me formatlist is one of the most helpful SCs, actually part of the provided functions is a powerful sort.
Anyway, here's a simple example for easy sorting of multi-dot numbers like IPs.
Also handy when dealing with folders/files representing software build versions (patch management).
FH
*: for the sometimes blinds like me
I share this "Did you know" only because it took me a couple of time to find the obvious (*) format configuration).
To me formatlist is one of the most helpful SCs, actually part of the provided functions is a powerful sort.
Anyway, here's a simple example for easy sorting of multi-dot numbers like IPs.
Code: Select all
$in = <<<MDOTNUM
192.168.2.103
255.255.255.0
193.168.2.103
192.2.2.103
192.169.2.103
192.168.3.103
192.168.3.3
192.168.2.104
MDOTNUM;
//<<<
text(formatlist($in, "sn", <crlf>));FH
*: for the sometimes blinds like me