in reply to need help:insert a line in a textfile


As a one-liner (with backup), see perlrun:
perl -i.bak -pe 'print "New line here\n" if $. == 1' file

--
John.