Skip to content

Commit 57c2c31

Browse files
lutixiayajaywcjlove
authored andcommitted
修改107行的g全局作用 (#90)
g不应该是匹配每一行的第一个匹配项,而是每一行的所有匹配项
1 parent 2fdb020 commit 57c2c31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

command/sed.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ sed 's/book/books/' file
104104

105105
sed -n 's/test/TEST/p' file
106106

107-
直接编辑文件 **选项-i**会匹配file文件中每一行的第一个book替换为books
107+
直接编辑文件 **选项-i**会匹配file文件中每一行的所有book替换为books
108108

109109
```shell
110110
sed -i 's/book/books/g' file

0 commit comments

Comments
 (0)