From 32997ccf6b2b7aea552d7b4427793c3742b6c9f1 Mon Sep 17 00:00:00 2001 From: Cristobal Forno Date: Wed, 18 Mar 2020 16:23:45 -0500 Subject: [PATCH] sed: minor syntax fix (#3908) --- pages.zh/osx/sed.md | 2 +- pages/osx/sed.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pages.zh/osx/sed.md b/pages.zh/osx/sed.md index 5ceb1cc009..d17d148bcd 100644 --- a/pages.zh/osx/sed.md +++ b/pages.zh/osx/sed.md @@ -12,7 +12,7 @@ - 替换文件中所有出现的字符串,覆盖文件(直接覆盖文件): -`sed -i '' 's/{{查找内容}}/{{替换内容}}/g' {{文件名}}` +`sed --in-place='' 's/{{查找内容}}/{{替换内容}}/g' {{文件名}}` - 仅替换与行模式(一种搜索条件)匹配的行内容: diff --git a/pages/osx/sed.md b/pages/osx/sed.md index 8e8be1b307..f04e8cd553 100644 --- a/pages/osx/sed.md +++ b/pages/osx/sed.md @@ -12,7 +12,7 @@ - Replace all occurrences of a string in a file, overwriting the file (i.e. in-place): -`sed -i '' 's/{{find}}/{{replace}}/g' {{filename}}` +`sed --in-place='' 's/{{find}}/{{replace}}/g' {{filename}}` - Replace only on lines matching the line pattern: