简体   繁体   中英

Tcl string double quote

I write this code in tcl script

set setting "-D key=value "
append setting "-D key2=value2"

catch {exec icv -vue $setting -c $cell_name -i $gds_file $::RULE_SET } err
puts "error == $err"

above line execute like this.........

icv -vue "-D key=value -D key2=value2" -c top -i /re/xyz/abc.gds /re/xyz/ab.rs

I want to remove double quote from output command ....? I want output like this................

icv -vue -D key=value -D key2=value2 -c top -i /re/xyz/abc.gds /re/xyz/ab.rs

If you are using Tcl8.5 or above, you can argument expansion operator {*} , as

catch {exec icv -vue {*}$setting -c $cell_name -i $gds_file $::RULE_SET } err

If you are using Tcl8.4 or below, then you can use eval command

catch {eval exec icv -vue $setting -c $cell_name -i $gds_file $::RULE_SET } err

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM