in reply to How to insert a new line?
perl -pe '$.==6 and $_.="horse\n"' inp.file > out.file [download]
"You're only given one little spark of madness. You mustn't lose it." - Robin Williams