I am using below code to split files based on blank lines but it does not work.
awk 'BEGIN{i=0}{RS="";}{x="F"++i;}{print > x;}'
Your help would be highly appreciated
find attachment of sample.txt file
I am using below code to split files based on blank lines but it does not work.
awk 'BEGIN{i=0}{RS="";}{x="F"++i;}{print > x;}'
Your help would be highly appreciated
find attachment of sample.txt file
Remove the DOS <CR> line terminators first
tr -d '\r' < /tmp/sample.txt | ...
, and then it should fly, piping the result into
... awk '{print > ("FILE" ++CNT)}' RS=""
RudiC! Very thankful for your answering..