Here is my situation...
System - HP UNIX (HP-UX hq5 B.11.00 U 9000/800 (td))
I have an HL7 (Health Level Seven) pipe-delimied file that does not have any carriage returns/line feeds. I need to insert a line feed before each segment type (MSH, PID, PV1, OBX, etc.) so that my PROGRESS program can read each line and determine the segment type for processing.
Input file looks like this:
MSH|data|data|data|data|data|data|data|PID|data|data|data|data|PV1|data|data|OBX|data|data|...
I need a command (I've tried sed) to convert the file to look like this:
MSH|data|data|data|data|data|data|data|
PID|data|data|data|data|
PV1|data|data|
OBX|data|data|...
If anyone can give me a command to do this, I will be most grateful.