sed: minor syntax fix (#3908)
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
- 替换文件中所有出现的字符串,覆盖文件(直接覆盖文件):
|
||||
|
||||
`sed -i '' 's/{{查找内容}}/{{替换内容}}/g' {{文件名}}`
|
||||
`sed --in-place='' 's/{{查找内容}}/{{替换内容}}/g' {{文件名}}`
|
||||
|
||||
- 仅替换与行模式(一种搜索条件)匹配的行内容:
|
||||
|
||||
|
@@ -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:
|
||||
|
||||
|
Reference in New Issue
Block a user