Dec 30 2022 10:47 AM
Hi ,
I have file with many rows . Since the size of limitations I want to read only line by line and put into any array . Please assist .
Dec 31 2022 05:05 AM - edited Dec 31 2022 05:06 AM
@Raghava Tiruchanur This splits every line by the tab character and fills the $total array with a ; delimiter
$total=@()
foreach ($line in Get-Content D:\Temp\file.txt) {
$content=$line.Split("`t") -join ';'
$total += $content
}
The contents of my test file.txt file are:
test1 test2 test3 test4
test5 test6 test7 test8
Jan 02 2023 01:58 AM
Jan 24 2023 11:58 AM