how to substitude in multiple lines between {{{ and }}} with sed or awk
- by chris
First give out the text example:
.... text ,..
{{{python
string1 = 'abcde'
string2 = '12345'
print(string1[[1:3]])
print(string2[[:-1]])
}}}
.... text ,..
the [[ and ]] happened outside of {{{ too.
And maybe there is spaces and tabs before {{{ and }}}.
I want to substitude all [[ and ]] into [ and ] between {{{ and }}}.
NOTICE: I need to write the result back to original file.
( Maybe sed or awk is not the only way to do this ? )