sed: minor syntax fix (#3908)

client-spec/clarity
Cristobal Forno 2020-03-18 16:23:45 -05:00 committed by GitHub
parent 9437f6382d
commit 32997ccf6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@
- 替换文件中所有出现的字符串,覆盖文件(直接覆盖文件): - 替换文件中所有出现的字符串,覆盖文件(直接覆盖文件):
`sed -i '' 's/{{查找内容}}/{{替换内容}}/g' {{文件名}}` `sed --in-place='' 's/{{查找内容}}/{{替换内容}}/g' {{文件名}}`
- 仅替换与行模式(一种搜索条件)匹配的行内容: - 仅替换与行模式(一种搜索条件)匹配的行内容:

View File

@ -12,7 +12,7 @@
- Replace all occurrences of a string in a file, overwriting the file (i.e. in-place): - 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: - Replace only on lines matching the line pattern: