mirror of https://github.com/CrimsonTome/tldr.git
sed: minor syntax fix (#3908)
parent
9437f6382d
commit
32997ccf6b
|
@ -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):
|
- 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:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue