I have a tab delimited file with three fields in each record. I need to obtain the value of the second field so I can parse it to create two new fields at the end of the record. Once I am able to identify the value of the field, I believe I know how to parse that data to create the two fields I need. Any assistance would be appreciated.
At this point I have the following that displays each record in the file successfully.
Get contents of file and add file date and account number to end of line in file
$f = Get-Content -Path "$stat_path$file_prefix$stat_date$file_extension"
ForEach ($line in $f) {
$record = $line.split("'t")
#$member_nbr[1] | Out-Host
#$PDF_file_name[2] | Out-Host
$record | Out-Host
}
New contributor
Michael Goins is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.