I would like to insert empty lines into a textfile via sed.
What I have is the position of the line as a shell variable.
As I tried several ways to implement this code into my script and did
not succed, I ask for help here.
It should look somehow like the following lines, but I do not know how
to tell sed, the line where it should insert an emty line.
linenumber=`cat $file | egrep -o -o "BLATT 2" sed -e's/:.*//g'`
sed -e '($linenumber)i\ # the problem is in this line *
' < oldfile > newfile
*the brackets are just to show my intention.
Thanks in advance,