mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-09-08 13:33:43 +02:00
sed: Add example to delete lines (#2596)
This commit is contained in:
parent
d367ea1c13
commit
7d23961ac3
1 changed files with 4 additions and 0 deletions
|
@ -18,6 +18,10 @@
|
||||||
|
|
||||||
`sed '/{{line_pattern}}/s/{{find}}/{{replace}}/' {{filename}}`
|
`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:
|
- Print only text between n-th line till the next empty line:
|
||||||
|
|
||||||
`sed -n '{{line_number}},/^$/p' {{filename}}`
|
`sed -n '{{line_number}},/^$/p' {{filename}}`
|
||||||
|
|
Loading…
Add table
Reference in a new issue