Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我通过 SSH 从 C# 向一个 unix 机器发送了一个很长的命令,看起来这个命令运行时间很长。我读到你可以通过 [enter] 来逃避它,但我有一些引语恶作剧会继续说不匹配的引语。
示例命令:
tibrvsend "Destination" "really really long string"
完全不发送
tibrvsend "Destination" "really really\
long string"
有无与伦比的“错误。
我确定这很简单,你们能帮我吗?
谢谢!
如果您的 SSH 会话是持久的,您可以声明一个 shell 脚本变量(例如$myvar='string'),然后在多个命令中将该(长)字符串的其他部分连接到字符串的末尾,然后通过将该变量传递给它而不是运行命令将整个字符串发送给它。
$myvar='string'