mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-24 18:55:25 +02:00
sed: get nth line of a file
This commit is contained in:
parent
c46e5c1d26
commit
06942171bd
1 changed files with 4 additions and 0 deletions
|
@ -33,3 +33,7 @@
|
|||
- 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