Forum Discussion
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
- vvc5042_164605
Nimbostratus
Nevermind, I have figured it out. Tried to delete question, not sure if deleted.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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