Hi,
I have a question regarding adding lines basically using sed after a pattern match. My code would look like
Several lines in the file
# abcd ##{{{
variable 1
variable 2
variable 3
.
.
.
## }}}
And I need to add a for loop just before the 'abcd' fold closes and my new code shud look like
Several lines in the file
# abcd ##{{{
variable 1
variable 2
variable 3
.
.
.
for i in something
do
XXXX
done
## }}}
I am not able to correctly match the pattern and get the abcd fold exactly as there are several other folds in the file.Please advise, what way to go
I have a question regarding adding lines basically using sed after a pattern match. My code would look like
Several lines in the file
# abcd ##{{{
variable 1
variable 2
variable 3
.
.
.
## }}}
And I need to add a for loop just before the 'abcd' fold closes and my new code shud look like
Several lines in the file
# abcd ##{{{
variable 1
variable 2
variable 3
.
.
.
for i in something
do
XXXX
done
## }}}
I am not able to correctly match the pattern and get the abcd fold exactly as there are several other folds in the file.Please advise, what way to go
Comment