Forum Discussion
David_Remington
Employee
Feb 28, 2008Interesting Class Behavior
So I am writing an iRule that essentially needs to parse an order list and exit processing on the first match.
However I have discovered that the order of the individual elements of the cla...
hoolio
Cirrostratus
Mar 06, 2008You can specify how you want the sort done, so you wouldn't necessarily need to pad the numbers:
% set my_list {"1 aa" "2 bb" "10 jj"}
"1 aa" "2 bb" "10 jj"
% lsort $my_list
{1 aa} {10 jj} {2 bb}
% lsort -dictionary $my_list
{1 aa} {2 bb} {10 jj}
Check the lsort man page (Click here) for more details on the options.
As for how much of a performance hit you'll see with lsort, I'm not sure. If you'll have a lot of entries and high load, I'd suggest testing with 'timing' enabled to see. I'd be curious to see what you find.
Aaron
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects