Q
Q
qvb2019-10-13 20:20:38
bash
qvb, 2019-10-13 20:20:38

How to insert a value in the penultimate row of a range?

Hi
there is a file:

[/text0]
text1 = text2
* =
[/text3]
text4 = text5
* =

Need to insert 'text n = text n' before '* =' but after '[/text0]
How can this be done?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
2
2bllk, 2019-10-13
@qvb

Based on the material presented in the answers to this question, I propose this option:
The file will turn into

[/text0]
text1 = text2
textN = textN
* =
[/text3]
text4 = text5
* =

PS: perhaps there is a more concise version

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question