sed começo do arquivo

sed  -i '1i text' filename
Alex Dee