I have a CSV file with delimiter as | , the values between the delimiter are not enclosed between quotes or any character. I am trying out a way to accept this file as an input and export a new CSV file with all the column to be enclosed in ^
Example:
Input:
1|Test|3
Output:
^1^|^Test^|^3^
Have tried below code but in vain:
get-content C:\ip.csv | foreach-object { $_ -replace '|' ,'^'} | set-content C:\op.csv