sd
Intuitive find and replace. More information: https://manned.org/sd.
- Trim some whitespace using a
regex(output stream:stdout):
| sd '\s+$' ''
- Replace words using capture groups (output stream:
stdout):
| sd '(\w+)\s+\+(\w+)\s+(\w+)' 'cmd: $1, channel: $2, subcmd: $3'
- Find and replace in a specific file (output stream:
stdout):
sd '' ''
- Find and replace in all files in the current project:
find . -type f -exec sd '' '' {} \;
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
