Forum Discussion
boneyard
MVP
Apr 25, 2012looking for nicer way to have variable in the middle of string
i want to create a string where the variable part is in the middle, iRule / TCL doesn't totally get this.
the line below causes the system to assume the variable is $variable_fixedpart2, not just $variable
set name "fixedpart1_$variable_fixedpart2"
this works:
set name "fixedpart1_$variable"
append name "_fixedpart2"
but is there a nicer way, in one line for example?
2 Replies
Sort By
- hoolio
Cirrostratus
Sure, you can use curly braces to escape the variable name: - thanks, works as a charm.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects