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? | ||||
|
feedback
|
This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.
|
| |||||||||||||
feedback
|
|
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
| |||
|
feedback
|
|
+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:
| |||
|
feedback
|