script::run¶
Description¶
tmsh invokes the procedure script::run when you issue the tmsh
shell command run cli script
“”name””.
A script is run relative to the module in which the run command is
invoked. The script::run procedure must be defined in the script
named by the command run. Scripts that are included by
tmsh::include are not required to implement the procedure
script::run.
Examples¶
proc script::run {} {
foreach { obj } [tmsh::get_config ltm pool all-properties] {
puts [tmsh::get_name $obj]
}
}
Results:
root@ltm1(Active)(tmos)# run cli script myScript.tcl
p1-pool
p2-pool
p3-pool