mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 06:22:07 +02:00
sed: add 11q example (#4399)
This commit is contained in:
parent
9f52c5371c
commit
40a910e6cf
1 changed files with 2 additions and 6 deletions
|
@ -22,9 +22,9 @@
|
|||
|
||||
`sed '/{{line_pattern}}/d' {{filename}}`
|
||||
|
||||
- Print only text between n-th line till the next empty line:
|
||||
- Print the first 11 lines of a file:
|
||||
|
||||
`sed -n '{{n}},/^$/p' {{filename}}`
|
||||
`sed 11q {{filename}}`
|
||||
|
||||
- Apply multiple find-replace expressions to a file:
|
||||
|
||||
|
@ -33,7 +33,3 @@
|
|||
- Replace separator / by any other character not used in the find or replace patterns, e.g., #:
|
||||
|
||||
`sed 's#{{find}}#{{replace}}#' {{filename}}`
|
||||
|
||||
- Print only the n-th line of a file:
|
||||
|
||||
`sed '{{n}}q;d' {{filename}}`
|
||||
|
|
Loading…
Add table
Reference in a new issue