From: Neubyr Neubyr Date: 2012-01-07T16:34:50+09:00 Subject: Re: one liner to insert line in a file Got it: $ ruby -i -pe 'print "First Line\n" if $.==1' filename.txt Thanks! -- Posted via http://www.ruby-forum.com/.