Hi PowerShell,
Here is my sample script
$file = aa.txt
Get-Content $file | ForEach-Object{ $_.Trim()} | ForEach-Object {($_ -replace "\s+",",")}
Output:
aa,11,aa
bb,22,bb
cc,33,cc
How to get middle or any element or column value?
Thanks
Hi PowerShell,
Here is my sample script
$file = aa.txt
Get-Content $file | ForEach-Object{ $_.Trim()} | ForEach-Object {($_ -replace "\s+",",")}
Output:
aa,11,aa
bb,22,bb
cc,33,cc
How to get middle or any element or column value?
Thanks