Possible Duplicate:
How can I prepend a tag to the beginning of several files?
How do I insert text at the beginning of a file via terminal?
How do I insert text at the beginning of a file via terminal? |
||||
|
|
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
|
|
|||||||||||||
|
|
Specify a line range in input file which is restricted to first line, then replace beginning of line with text to add and redirect o/p to a new file
|
|||
|
|
|
+1 for abc's answer because I find his nice sed expression. However Regis doesn't want two files, he wants to insert text in his file; so I have adapted abc's answer:
|
|||
|
|