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