关于在引号中使用引号的说明
某字符串要在paramiko远程命令中使用
我的字符串格式是
string = 'aaaaa \'this is single quote\' \\"this is double quote\\"'
想保留的双引号用两个反斜线转义以保留
我希望在字符串中保留单引号和双引号 因此在最外层用单引号''引起来
在paramiko中使用时
client.exec_commond('echo "%s" > aa.log' % string)
某字符串要在paramiko远程命令中使用
我的字符串格式是
string = 'aaaaa \'this is single quote\' \\"this is double quote\\"'
想保留的双引号用两个反斜线转义以保留
我希望在字符串中保留单引号和双引号 因此在最外层用单引号''引起来
在paramiko中使用时
client.exec_commond('echo "%s" > aa.log' % string)