test.bat- #&cls&@powershell -c "Get-Content '%~0' | Out-String | Invoke-Expression" &pause&exit
- cls
- $arr1 = (Get-Content '1111.txt') -split '\s|\.|,' | Where-Object { $_ -notmatch '^\s*$' }
- $arr2 = (Get-Content '1112.txt') -split '\s|\.|,' | Where-Object { $_ -notmatch '^\s*$' }
- $arr3 = (Get-Content '1113.txt') -split '\s|\.|,' | Where-Object { $_ -notmatch '^\s*$' }
- $line = ''
- 0..$arr1.Count | foreach { $line += '{{{0},{1}}} -> "{2}",' -f $arr1[$_],$arr2[$_],$arr3[$_] }
- $line -replace ',$','' | Out-File '3.txt' -Encoding default
复制代码
|