【发布时间】:2016-11-11 20:12:56
【问题描述】:
我正在尝试使用 Powershell 中的 Write-Output 命令向 Netcat 写入一行,但如果不发送新行,我似乎无法执行此操作。到目前为止,我已经尝试过......
Write-Output "command" | nc -w1 aa.bb.cc.dd xxxx
和
"command" | nc -w1 aa.bb.cc.dd xxxx
... 但是,两者都会导致新行与“命令”一起发送。有人可以帮我找到类似于 Linux 中的 Write-Host -NoNewLine 或 Echo -n 的解决方案吗?
【问题讨论】:
标签: powershell output newline netcat