I have a text file divided in stanzas.Each stanza starts with a [keyword] and ends with a blank line. Something like this:[keyword1]param1 = value1param2 = value2param3 = value3[keyword2]param4 = value4param5 = value5...I need a script (probably a one line command will work) to insert 2 lines immediately after a given [keyword]. Lines to be inserted are like the above couples:param = valueI was thinking about using sed with in place editing plus a backup copy file just in case.
Adding 2 lines in text file stanza
bash;shell script;sed;awk