Hi,
I am trying to insert some copy-right information into the beginning of some source files. I know that using sed in the following way:
sed "1iSome copyrighted information." sample.txt
would insert the text "Some copyrighted information" to the beginning of sample.txt.
I need to insert text from a file to the beginning of sample.txt. Is there any way in sed that I could use a cat
command for the above purpose, say something like the following?:
sed "1i{cat header.txt}" sample.txt
I have googled for the above and have not found exactly what I have been looking for. Any help on this is most welcome.
Thanks.