Forum Discussion
Frank_J_104756
Nov 04, 2009Historic F5 Account
comparing variable values
I have 4 counter variables that are set. I've incremented them based on the of times certain strings are seen in an array. I now need to compare these 4 different variables so that I can find out w...
Frank_J_104756
Nov 05, 2009Historic F5 Account
thx for mentioning the 0 index Aaron, I'd have been scratching my head over that !!
then I can use winner to retrieve the correct value of the array which is using the variables above as indexes
array set counterarray {
$server1lb$server1ip
$server2lb$server2ip
$server3lb$server3ip
$server4lb$server4ip
}
set winner [lindex [lsort -integer { $server1lb $server2lb $server3lb $server4lb }] 0]
LB::select $counterarray($winner)
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
