I'm modifying an application backout script in JACL. This script is designed to search for a JVM argument string that we want to remove within the JVM arguments of the server. New to the application this release cycle is a jvm argument ${variable_name}. My old code
set ixReplace [lsearch -exact $jvm_args "string_to_search"]
set jvm_args [lreplace $jvm_args $ixReplace $ixReplace]
now returns an extra set of {} like this
-Xjit:disableOSR -Xgc:preferredHeapBase=0x100000000 -Xmnx1152m -Xmns512m -Xgcpolicy:gencon -agentlib:getClasses -noverify {${variable_name}}
I've found multiple articles about how to remove the extra {} here and here but I cannot seem to set the results to a variable to which i'm using to set new jvm arguments.
My ultimate goal is to have the correct string set to a variable called jvm_args so that I may use to update the JVM arguments like this.
set attr {}
lappend attr [list genericJvmArguments $jvm_args]
$AdminConfig modify $server_jvm_id $attr
Any help or suggestions would be greatly appreciated.