Wednesday, April 14, 2021

Re: How to remove paragraphs with specific text from my text file?

On 2021-04-14 05:13, Igor wrote:
> I have 130 thousand lines of output file.
> - Each output is in separate paragraph.
> - Each paragraph has at least two or more rows.
> I would like to remove all paragraphs that ends with (this text is
> alway last line in paragraph):
> DB20000I The SQL command completed successfully.

To delete the paragraphs with this text:

:g/DB20000I The SQL command completed successfully/'{,'}d

should do the trick

-tim



--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20210414075211.76d40337%40bigbox.attlocal.net.

No comments: