From 57c2c310988df36e68e0ee703037fa3b46997427 Mon Sep 17 00:00:00 2001 From: lutixiaya <48750425+lutixiaya@users.noreply.github.com> Date: Sun, 5 May 2019 19:56:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9107=E8=A1=8C=E7=9A=84g?= =?UTF-8?q?=E5=85=A8=E5=B1=80=E4=BD=9C=E7=94=A8=20(#90)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit g不应该是匹配每一行的第一个匹配项,而是每一行的所有匹配项 --- command/sed.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/sed.md b/command/sed.md index b3981ed2e9..bad5113bda 100644 --- a/command/sed.md +++ b/command/sed.md @@ -104,7 +104,7 @@ sed 's/book/books/' file sed -n 's/test/TEST/p' file -直接编辑文件 **选项-i** ,会匹配file文件中每一行的第一个book替换为books: +直接编辑文件 **选项-i** ,会匹配file文件中每一行的所有book替换为books: ```shell sed -i 's/book/books/g' file