Converting text file with one long row to file having many separated rows

Viewed 12

I have .txt file with data in one long line like:
1#|APPLE#|RED#|N#|2022-09-17#$#2#|PEAR#|GREEN#|N#|2022-09-15#$#3#|ORANGE#|ORANGE#|N#|2022-08-17#$#

#| is a column delimiter
#$# is a row delimiter

I would like to have it converted e.g. with PowerShell to following format:

1|APPLE|RED|N|2022-09-17
2|PEAR|GREEN|N|2022-09-15
3|ORANGE|ORANGE|N|2022-08-17

0 Answers
Related