diff --git a/pages/common/sd.md b/pages/common/sd.md index fa9f3f9a5e..a27ef2e2c0 100644 --- a/pages/common/sd.md +++ b/pages/common/sd.md @@ -1,6 +1,6 @@ # sd -> `sd` is an intuitive find & replace CLI. +> Intuitive find & replace CLI. - Trim some whitespace using regex: @@ -10,10 +10,10 @@ `{{echo 'cargo +nightly watch'}} | sd '(\w+)\s+\+(\w+)\s+(\w+)' 'cmd: $1, channel: $2, subcmd: $3'` -- Find and replace in a file: +- Find and replace in a file printing the result to stdout: -`sd -i {{'window.fetch'}} {{'fetch'}} {{http.js}}` +`sd -p {{'window.fetch'}} {{'fetch'}} {{http.js}}` -- Find and replace across a project: +- Find and replace across a project changing each file in place: -`sd -i {{'from "react"'}} {{'from "preact"'}} $(find . -type f)` +`sd {{'from "react"'}} {{'from "preact"'}} $(find . -type f)`