diff --git a/pages/common/sed.md b/pages/common/sed.md index d92ba4d88..4138cfd63 100644 --- a/pages/common/sed.md +++ b/pages/common/sed.md @@ -18,6 +18,10 @@ `sed '/{{line_pattern}}/s/{{find}}/{{replace}}/' {{filename}}` +- Delete lines matching the line pattern: + +`sed '/{{line_pattern}}/d' {{filename}}` + - Print only text between n-th line till the next empty line: `sed -n '{{line_number}},/^$/p' {{filename}}`