summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregory <chmln@users.noreply.github.com>2020-07-03 12:01:44 -0400
committerGitHub <noreply@github.com>2020-07-03 12:01:44 -0400
commit987373bdb11b1ddbbe3287b8880e4595c50c18f9 (patch)
tree7d10211b737c382a398ed3ce77d9929f4a998615
parentd3aa277628b8b91e794aa7bc8ee86dee92863ab2 (diff)
parente9e3a4d32681e4ac0713187e698eb73679ccb27c (diff)
Merge pull request #66 from rstacruz/patch-1
Readme: fix the sed slashes example
-rw-r--r--README.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/README.md b/README.md
index 5c3e893..f04f016 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,7 @@ Some cherry-picked examples, where `sd` shines:
- Extracting stuff out of strings containing slashes:
- sd: `echo "sample with /path/" | sd '.*(/.*/)' '$1'`
- sed: use different delimiters every time depending on expression so that the command is not completely unreadable
- - `echo "sample with /path/" | sed -E 's/.*(/.*/)/\1/g'`
+ - `echo "sample with /path/" | sed -E 's/.*(\\/.*\\/)/\1/g'`
- `echo "sample with /path/" | sed -E 's|.*(/.*/)|\1|g'`
- In place modification of files:
- sd: `sd before after file.txt`