|
I've been working with X12 documents for the last year and a half and finally wrote a C program to print out the segments one per line. However, a nice quick-and-dirty trick is to convert the segment terminator (usually, but not always, a tilde) to a newline.
# cat file | tr '~' '\n' | grep 'SR\*[0-9]\{11\}\*'
|