From 1efb6b906d3c152ab634c9ee2d1fa0d2bd94bad3 Mon Sep 17 00:00:00 2001 From: "James H. Linder" Date: Thu, 27 Mar 2014 14:27:35 -0400 Subject: [PATCH 1/2] Adding a line for sed for making multiple replacements in one command. --- pages/common/sed.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pages/common/sed.md b/pages/common/sed.md index 338a77e21c..55a7d61a0d 100644 --- a/pages/common/sed.md +++ b/pages/common/sed.md @@ -14,3 +14,8 @@ - replace all occurrences of an extended regular expression in a file `sed -E 's/{{regex}}/{{replace}}/g' {{filename}}` + +- replace all occurrences of multiple strings in a file +`sed -e 's/{{find}}/{{replace}}/g' -e 's/{{find}}/{{replace}}/g' {{filename}}` + + From 27be7514788e3d92adbefcf103c2330419c2738c Mon Sep 17 00:00:00 2001 From: Igor Shubovych Date: Sun, 18 May 2014 01:12:37 +0300 Subject: [PATCH 2/2] sed: fix md syntax --- pages/common/sed.md | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/common/sed.md b/pages/common/sed.md index 55a7d61a0d..87c4d0b4fa 100644 --- a/pages/common/sed.md +++ b/pages/common/sed.md @@ -16,6 +16,7 @@ `sed -E 's/{{regex}}/{{replace}}/g' {{filename}}` - replace all occurrences of multiple strings in a file + `sed -e 's/{{find}}/{{replace}}/g' -e 's/{{find}}/{{replace}}/g' {{filename}}`