Can someone help to come up with Ruby one-liner to add a line at the
beginning of a file? Basically a Ruby equivalent for following sed
example-
$ sed -i "1i $variable" file.txt

--neubyr

-- 
Posted via http://www.ruby-forum.com/.