Probably easy to answer for you guys:
How can i get awk to put a blank line into my file every n lines?
Probably easy to answer for you guys:
How can i get awk to put a blank line into my file every n lines?
$ awk -v n=5 '$0=(!(NR%n))?"\n"$0:$0'
If you want to change 'n', please set the parameter 'n' by awk's -v option.
A more "awk-ish" way to write smcameron's answer:
awk 'NR % 5 == 0 {print ""} 1' myfile
The trailing "1" is a condition that is always true, and will trigger the default action which is to print the current line.
awk '{print; if (FNR % 5 == 0 ) printf "\n";}' your_file
I guess 'print' should be before 'printf', and FNR is more accurate for your task.