We are parsing some large EDI files that do not contain CR/LF. However, they do have
~ (tilde) as a segment delimiter.
I am trying to extract the control record for the file and the last bytes of my 120 MB file look something like this:
There is only one control record in the file and it always starts with
So, is there an easy way using standard Unix cut, awk, grep, etc. tools to cut this file to get the SE*62300*39093 segment, other than converting the
~ to CRLF and tailing the last three lines of the file?
I am not a Unix guru, so the answer may be obvious to an experienced user. Also, I have no control over the file format.