Intuitive find and replace. More information: https://github.com/chmln/sd.
stdout
):echo 'lorem ipsum 23 ' | sd '\s+$' ''
stdout
):echo 'cargo +nightly watch' | sd '(\w+)\s+\+(\w+)\s+(\w+)' 'cmd: $1, channel: $2, subcmd: $3'
stdout
):sd -p 'window.fetch' 'fetch' path/to/file.js
stdout
):sd 'from "react"' 'from "preact"' "$(find . -type f)"