split single file into many

Hello,

We have a text file with more than 1500 paragraphs.

There is a blank line to separate paragraphs.

We need to create one text file (with any name but unique) per paragraph. In other words, how can i extract each paragraph and create a separate file with those contents (so 1500 text files as 1500 paragraphs)?

TIA
Prvn

Try something like:

awk ' BEGIN{f="file1";i=1}/^$/{f="file"++i;next}{print $0 > f}' filename

Regards

awk ' BEGIN { ctr=0;filename="FILE_" ctr}
  /^$/ { ctr= ctr + 1; filename="FILE_" ctr; next }
  {print $0 >>filename }' <file>

Thank you Franklin and Aju_Kup.

Your solutions worked great.

Thanks
Prvn