sed: get nth line of a file
This commit is contained in:
committed by
Agniva De Sarker
parent
c46e5c1d26
commit
06942171bd
@@ -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}}`
|
||||
|
||||
Reference in New Issue
Block a user