我有过
set a = 'foo'
set b= 'string'
set b = "${b} = \"${a}\""
echo $b我希望输出是string = "foo"
这能否在一条线上进行,以避免双重报价中的双引号?我知道你不能用\来逃避双引号,所以有什么办法吗?
发布于 2014-06-05 17:59:40
试试这个:
set a="foo"
set b='string'
set b="${b} = "\""${foo}"\"
echo ${b}编辑语法
https://stackoverflow.com/questions/24066800
复制相似问题