I have a variable $line which i determine earlier in my script.
Now im trying to use sed to insert some text at that specific line number.
This works
Code:
sed '7i\
blah blah' in.txt' > out.txt
But how do I do this when the 7 is a variable?
Code:
sed "$linei\
blah blah' in.txt" > out.txt
How do I tell it that the i is not part of the variable name?
Thanks