How can I insert some text in specific lines of a file? What is the simplest method that I can use? (bash
, sed
, awk
?)
What I want to do might be simple, but I don't know where I should start. It takes too much time for me to try to do this manually (I have a lot of files that I have to change for Excel/Calc later use).
Here is my input file example:
4.06
4.05
5.04
4.06
34.50
56.06
45.33
36.44
And I want something like this (insert text before line 1 and 5):
Exp1
4.06
4.05
5.04
4.06
Exp2
34.50
56.06
45.33
36.44
How can I do this?