I have written one TCL script but I have one problem when making a string variable as below:
set a 100 set b \"this is variable[$a]\"
I want b
You just need to escape it:
set a 100 set b "this is variable\[$a\]"
Other possibilities (but escaping the brackets is better):
set b [format {this is variable[%d]} $a] set b [subst -nocom -noback {this is variable[$a]}]
Documentation: set, format, subst