For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

vvc5042_164605's avatar
vvc5042_164605
Icon for Nimbostratus rankNimbostratus
Jul 29, 2014

TMSH Scripting, using the proc script::init {} in the tmsh editor

I'm trying to use the tmsh script editor in the command line to create a tmsh script. I have been successful in my efforts when initializing and running all tmsh commands in the proc script::run {} script. Now I would like to try another method of doing the same thing by creating separate proc functions for different functionalities, using the "global" variables that are initialized in the proc script::init{}

 

My question is how do I use the "global" variables that I have created in that proc script::init {} in other procs that I have created to do other functions?

 

I'm new to the TCL language, but as I understand it variables need to be placed in namespaces. I have created my variables by putting them into the global namespace by using "set ::VariableName."

 

I have tried some methods from research I've done on Google, but those have not worked for me.

 

Documentation: https://devcentral.f5.com/wiki/tmsh.script__init.ashx

 

Thanks you

 

I know I can achieve the same output in other well known methods, but I want to try something new.

 

1 Reply