小编Jar*_*ers的帖子

PowerShell Out-file -width 导出到文件时不会截断内容

我有 Windows 7 和 PowerShell 4.0。将内容导出到文件时,-Width参数不会根据给定设置进行格式化。这是我正在尝试做的事情的示例:

"It is a nice hot sunny day" | Out-File -FilePath ".\output.txt" -Encoding ASCII -Width 10
Run Code Online (Sandbox Code Playgroud)

导出结果不会在第 10 个字符处被截断。它根本不会被截断。我不知道出了什么问题。

powershell powershell-4.0

5
推荐指数
1
解决办法
6493
查看次数

标签 统计

powershell ×1

powershell-4.0 ×1