Aqui vai você. Entrada (testfile):
RFH ^B^C^X^A^Q^C3MQSTR ^D¸X<jms>
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
RFH ^B^C^X^A^Q^C3MQSTR ^D¸X<jms>
........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
RFH ^B^C^X^A^Q^C3MQSTR ^D¸X<jms>
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
Código:
awk '{print $0 > "file" NR}' RS='\n\n' testfile
Substitua "arquivo" pelo nome dos arquivos que você deseja ter. Com este exemplo, você terá:
$ cat file1
RFH ^B^C^X^A^Q^C3MQSTR ^D¸X<jms>
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
$ cat file2
RFH ^B^C^X^A^Q^C3MQSTR ^D¸X<jms>
........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
$ cat file3
RFH ^B^C^X^A^Q^C3MQSTR ^D¸X<jms>
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....
.........some text of many lines.....