Explorar o código

sed: minor syntax fix

Marco Bonelli %!s(int64=6) %!d(string=hai) anos
pai
achega
e75baf7d73
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      pages/common/sed.md

+ 3 - 3
pages/common/sed.md

@@ -24,7 +24,7 @@
 
 - Print only text between n-th line till the next empty line:
 
-`sed -n '{{line_number}},/^$/p' {{filename}}`
+`sed -n '{{n}},/^$/p' {{filename}}`
 
 - Apply multiple find-replace expressions to a file:
 
@@ -34,6 +34,6 @@
 
 `sed 's#{{find}}#{{replace}}#' {{filename}}`
 
-- Print only the `N`th line of a file:
+- Print only the n-th line of a file:
 
-`sed '{{N}}q;d' {{filename}}`
+`sed '{{n}}q;d' {{filename}}`