Forum Discussion
Fred_Slater_856
Feb 02, 2015Historic F5 Account
DebBabu- Pete's answer is great. Just for education, here is an example in pure Tcl without using the iapp package. Keep this reference handy: http://tmml.sourceforge.net/doc/tcl.
[root@big84:Active:Standalone] ~ more example.tcl
set myTable "{{ pool_ip 10.10.1.2 pool_port 443 }} {{ pool_ip 10.10.1.3 pool_port 443 }} {{ pool_ip 10.10.1.4 pool_port 443 }}"
set myIpTag "pool_ip"
set myPortTag "pool_port"
foreach outerGroup $myTable {
foreach innerGroup $outerGroup {
array set x $innerGroup
puts "IP $x($myIpTag) PORT $x($myPortTag)"
}
}
[root@big84:Active:Standalone] ~ tclsh example.tcl
IP 10.10.1.2 PORT 443
IP 10.10.1.3 PORT 443
IP 10.10.1.4 PORT 443
[root@big84:Active:Standalone] ~