how to escape the double quote of the command we send to capture command
hi we can send capture "command" to tcl port. If the command contains double quote, how to escape it? I tried changing " to " , not working Thanks Peter
What is the capture command? What commands have a " in them? Do you have a specific example with more details of what you're doing?
i am sending the command via tcl port, not telnet. Some command need to use "capture", such as
capture "ocd_reg"
If pass the tcl statment to capture, such as echo "peter", then i need to escape the double quote. But i don't know how to
Thanks Peter
I see. I haven't used the TCL port for anything. You might try asking about this on the regular openocd user mailing list.
This seems like a generic TCL string escaping issue (not related just to the "TCL port" of OpenOCD).
@quantrpeter - The following suggestion has worked for me - escape curly braces ({ and }) in your original string, then wrap your string into a pair of curly braces:
https://stackoverflow.com/questions/5302120/general-string-quoting-for-tcl/5302213#5302213
If the problems persists, please try asking on openocd-user mail list: http://openocd.org/discussion/mailing-lists/
@quantrpeter, are you OK with the provided resolution? I would like to close the issue.