Closed
Description
sed
can easily delete text between blank lines but gnused
treats blank lines differently.
An example would be worthwhile. Two come to mind, replacing three blank lines with a single blank line and deleting a line and the following blank line (paragraph) if it contains a search string. Non-gnused:
sed 's/\n.*kill.*\n\n/\n/g' sample_text
sample_text
This is a
sample text
kill = whatever
demonstration.
output
This is a
sample text
demonstration.
Metadata
Metadata
Assignees
Labels
No labels