有没有办法在powershell中更新命令输出的当前行?
我知道怎么写到同一行:
Write-Host "hello " -NoNewLine
Write-Host "world!" -NoNewLine
但是有没有办法完成当前的线路更换?就像是:
Write-Host "hello "
Write-Host "world!" -ReplaceLine
Run Code Online (Sandbox Code Playgroud)
提前致谢!
解:
Write-Host "hello " -NoNewLine
Write-Host "`rworld!"
Run Code Online (Sandbox Code Playgroud)