mirror of
https://github.com/chmln/sd
synced 2025-02-16 15:58:23 +00:00
Update README.md
This commit is contained in:
parent
324fd1c132
commit
7ba1ac4f65
1 changed files with 2 additions and 2 deletions
|
@ -32,8 +32,8 @@ Some cherry-picked examples, where `sd` shines:
|
|||
- sd: `sd before after`
|
||||
- sed: `sed s/before/after/g`
|
||||
- Replace newlines with commas:
|
||||
- sd: `sd '\r' ','`
|
||||
- sed: `sed ':a;N;$!ba;s/\r/,/g'`
|
||||
- sd: `sd '\n' ','`
|
||||
- sed: `sed ':a;N;$!ba;s/\n/,/g'`
|
||||
- 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
|
||||
|
|
Loading…
Add table
Reference in a new issue