mirror of
https://github.com/chmln/sd
synced 2024-11-22 11:13:04 +00:00
Readme: fix the sed slashes example
This commit is contained in:
parent
0cfe1b766c
commit
e9e3a4d326
1 changed files with 1 additions and 1 deletions
|
@ -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`
|
||||
|
|
Loading…
Reference in a new issue