Use modern CLI tools to search and replace text in files
Dusty Candland |
|
cli, ripgrep, sd
Searching and replacing text is easier with modern CLI tools. I'll show you how to use [ripgrep](https://github.com/BurntSushi/ripgrep) and [sd](https://github.com/chmln/sd) to search and replace text in files.
Searching and replacing text is easier with modern CLI tools. I'll show you how to use ripgrep and sd to search and replace text in files.
Check for the text in files. This is case insensitive.
ripgrep -li old_text
Replace the text in files. This will replace the text in the files, in place.
ripgrep -l old_text | xargs -n 1 sd old_text new_text
Webmentions
These are webmentions via the IndieWeb and webmention.io. Mention this post from your site: