File tree 1 file changed +6
-6
lines changed 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 3
3
> Intuitive find & replace CLI.
4
4
> More information: < https://github.com/chmln/sd > .
5
5
6
- - Trim some whitespace using a regular expression:
6
+ - Trim some whitespace using a regular expression (output stream: ` stdout ` ) :
7
7
8
8
` {{echo 'lorem ipsum 23 '}} | sd '\s+$' '' `
9
9
10
- - Replace words using capture groups:
10
+ - Replace words using capture groups (output stream: ` stdout ` ) :
11
11
12
12
` {{echo 'cargo +nightly watch'}} | sd '(\w+)\s+\+(\w+)\s+(\w+)' 'cmd: $1, channel: $2, subcmd: $3' `
13
13
14
- - Find and replace in a file printing the result to ` stdout ` :
14
+ - Find and replace in a specific file (output stream: ` stdout ` ) :
15
15
16
- ` sd -p {{'window.fetch'}} {{'fetch'}} {{http .js}} `
16
+ ` sd -p {{'window.fetch'}} {{'fetch'}} {{path/to/file .js}} `
17
17
18
- - Find and replace across a project changing each file in place :
18
+ - Find and replace in all files in the current project (output stream: ` stdout ` ) :
19
19
20
- ` sd {{'from "react"'}} {{'from "preact"'}} $(find . -type f) `
20
+ ` sd {{'from "react"'}} {{'from "preact"'}} " $(find . -type f)" `
You can’t perform that action at this time.
0 commit comments