K
K
kromov2014-06-19 23:19:38
Programming
kromov, 2014-06-19 23:19:38

What is the correct way to form a sed command to delete the nth number of lines after the line that contains a certain word?

Hello.
There is a text file with the following content:
test {12345
67890
bbbb
123456}
example {abcd
111111
222222}
test {122222
67890aaa
bbbb111 123456sss
}
her.
That is, the output in the example above will be like this:
example {abcd
111111
222222}
Must be implemented using sed.
How to form a team correctly?
Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question