Forum Discussion
Robert_47833
Altostratus
Feb 13, 2014[LB::server pool] in V11
Hi,team output of COMMAND [LB::server pool] in V11 is /Common/pool-name
is there one way to get only pool-name and this command also can be applied in v10 to get only pool-name
2 Replies
- Mike_61663
Cirrus
I'm sure someone will come up with a more elegant solution but this should work...
[string range [LB::server pool] [expr [string last / [LB::server pool]] + 1] [string length [LB::server pool]]] - Kevin_Stewart
Employee
Here are a few other options:
set mypool "/Common/test_pool" log local0. [string map {"/Common/" ""} $mypool] log local0. [getfield $mypool "/" 3] log local0. [string range $mypool [expr [string last / $mypool] + 1] end] log local0. [lindex [split $mypool "/"] 2]Oddly, in a quick timing test the two list-based functions seemed to do the best (getfield and lindex/split).
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