1
0
Fork 0
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:
Ray Voice 2020-10-13 02:53:52 +05:00 committed by GitHub
parent 9f52c5371c
commit 40a910e6cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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}}`