I've got a file where the first few bites define some of the attributes of the file.
The 9th bite is the record separator. So the records are not separated by \n but by whatever is on the 9th bite.
I need to read this file, set RS and then read the file "again" but now separated by this new record separator.
Input file (here the record separator is '):
UNA:+,? 'UNB+UNOC:3+4042805000102:14+4016001000655:14+201231:0206+EC33218279A++TL'UNH+1+MSCONS:D:04B:UN:2.3'BGM+7+EC33218279A-1+9'DTM+137:202012310206:203'RFF+Z13:13018'NAD+MS+4042805000102::9'NAD+MR+4016001000655::9'UNS+D'NAD+DP'LOC+172+DE00108108359V0000000000000088446'DTM+163:202012300000?+01:303
awk program would be something like:
{ RS=substr($0, 9, 1) }
{ do magic }
Is it somehow possible?