Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
powershell选择字符串模式crlf问题_Powershell - Fatal编程技术网

powershell选择字符串模式crlf问题

powershell选择字符串模式crlf问题,powershell,Powershell,powershell是否具有在自动启动新行之前输出的默认行长度?我在输出文件中看到了多余的CRLF,它们不应该出现在输出文件中(即,输入文件是一个csv文件,每行末尾都有CRLF,但在执行-pattern后,结果文件将每行拆分为多行,每行的最大大小似乎相同)来自我的powershell配置文件(用适合您的内容替换500): 从我的powershell配置文件(用适合您的内容替换500): 您似乎从这里复制了代码,并将其标记为可能的副本。如果你做了这样的复制,你应该1)链接到你的源代码,2)用你自

powershell是否具有在自动启动新行之前输出的默认行长度?我在输出文件中看到了多余的CRLF,它们不应该出现在输出文件中(即,输入文件是一个csv文件,每行末尾都有CRLF,但在执行-pattern后,结果文件将每行拆分为多行,每行的最大大小似乎相同)

来自我的powershell配置文件(用适合您的内容替换500):


从我的powershell配置文件(用适合您的内容替换500):


您似乎从这里复制了代码,并将其标记为可能的副本。如果你做了这样的复制,你应该1)链接到你的源代码,2)用你自己的话包含其他内容来解释它。你似乎是从这里复制了代码,并将其标记为可能的副本。如果你这样做,你应该1)链接到你的来源,2)用你自己的话包括其他内容来解释它。
# Dynamically change the host buffer width because some cmdlets specifically
# rely on it and truncate information that exceeds the initial limit (80 characters).

if ($Host -and $Host.UI -and $Host.UI.RawUI) 
{
    $rawUI = $Host.UI.RawUI
    $oldSize = $rawUI.BufferSize
    $typeName = $oldSize.GetType().FullName
    $newSize = New-Object $typeName (500, $oldSize.Height)
    $rawUI.BufferSize = $newSize
}