Tamir SharpSsh RunCommand 中的语法问题
Syntax issue in Tamir SharpSsh RunCommand
我正在尝试在我的程序中编写以下代码行:
xxxx.RunCommand("echo "select count(*) from TABLE_NAME;"|sqlplus DB Connection");
据我所知,RunCommand 的语法是 RunCommand("Unix Command");
但是在我的程序中我需要使用多个" "。请在这里建议什么是正确的代码。抱歉这个基本问题。
如果您的意思是转义它们,则需要改用 \"
。
xxxx.RunCommand("echo \"select count(*) from TABLE_NAME;\"|sqlplus DB Connection");
或者使用逐字字符串文字加倍。
xxxx.RunCommand(@"echo ""select count(*) from TABLE_NAME;""|sqlplus DB Connection");
我正在尝试在我的程序中编写以下代码行:
xxxx.RunCommand("echo "select count(*) from TABLE_NAME;"|sqlplus DB Connection");
据我所知,RunCommand 的语法是 RunCommand("Unix Command");
但是在我的程序中我需要使用多个" "。请在这里建议什么是正确的代码。抱歉这个基本问题。
如果您的意思是转义它们,则需要改用 \"
。
xxxx.RunCommand("echo \"select count(*) from TABLE_NAME;\"|sqlplus DB Connection");
或者使用逐字字符串文字加倍。
xxxx.RunCommand(@"echo ""select count(*) from TABLE_NAME;""|sqlplus DB Connection");