From cbe477bf5003c00e4f00a466ed0c608dc394840b Mon Sep 17 00:00:00 2001 From: Marco Bonelli Date: Tue, 8 Jan 2019 19:28:59 +0100 Subject: [PATCH] sed: fix misleading examples description. (#2685) --- pages/common/sed.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/common/sed.md b/pages/common/sed.md index 4138cfd634..3316741d71 100644 --- a/pages/common/sed.md +++ b/pages/common/sed.md @@ -2,11 +2,11 @@ > Edit text in a scriptable manner. -- Replace the first occurrence of a string in a file, and print the result: +- Replace the first occurrence of a regular expression in each line of a file, and print the result: -`sed 's/{{find}}/{{replace}}/' {{filename}}` +`sed 's/{{regex}}/{{replace}}/' {{filename}}` -- Replace all occurrences of an extended regular expression in a file: +- Replace all occurrences of an extended regular expression in a file, and print the result: `sed -r 's/{{regex}}/{{replace}}/g' {{filename}}`