Forum Discussion
Kevin_Stewart
Jul 05, 2014Employee
Try this:
set var_1 [expr { [info exists var_2] || [info exists var_3] }]
By the way, Nitass is probably using the tclsh shell in the BIG-IP management GUI. You can also write pure TCL scripts with this:
!/usr/bin/tclsh
set var_2 true
set var_3 false
puts [info exists var_2]
puts [info exists var_3]
set var_1 [expr { [info exists var_2] || [info exists var_3] }]
puts $var_1
Then chmod the script:
chmod 755 balto.tcl
And run it like any other Bash script:
./balto.tcl
Great for troubleshooting TCL logic outside of an iRule.