Dip*_*tel 2 powershell lowercase
我编写了以下代码将csv转换为小写.
(Get-Content "$file" -Raw).ToLower() | Out-File "$outfile"
Run Code Online (Sandbox Code Playgroud)
但得到错误就像:
Get-Content : A parameter cannot be found that matches parameter name 'Raw'.
Run Code Online (Sandbox Code Playgroud)
作为briantist建议的替代方案,将输出Get-Content
传递ForEach-Object
给ToLower()
每个单独的行并调用:
Get-Content $file |ForEach-Object { $_.ToLower() } |Out-File $outfile
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3376 次 |
最近记录: |