sd
Intuitive find and replace. tldr-pages
On several platforms
Several platforms
Trim some whitespace using a regex (output stream: stdout)
echo 'lorem ipsum 23 ' | sd '\s+$' ''IdentifyReplace words using capture groups (output stream: stdout)
echo 'cargo +nightly watch' | sd '(\w+)\s+\+(\w+)\s+(\w+)' 'cmd: $1, channel: $2, subcmd: $3'IdentifyFind and replace in a specific file (output stream: stdout)
sd --preview 'window.fetch' 'fetch' path/to/file.jsIdentifyFind and replace in all files in the current project
find . -type f -exec sd 'from "react"' 'from "preact"' {} \;Identify-typetype is (block, char, dir, file, symlink, pipe, socket) toybox-execRun command with path toyboxTrips 1 Sigma rule: informationalFile and Directory Discovery - Linux by Daniil Yugoslavskiy, oscd.community, CheraghiMilad