Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Get column value

$
0
0

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


Viewing all articles
Browse latest Browse all 6937

Trending Articles