sad

CLI search and replace tool with regex support and interactive preview

brewmacoslinux
Try with needOr install directly
Source

About

CLI search and replace | Space Age seD

Commands

sad

Examples

Replace all occurrences of 'foo' with 'bar' in a file$ sad 'foo' 'bar' file.txt
Interactive search and replace with preview before committing changes$ sad 'pattern' 'replacement' file.txt --interactive
Use regex to replace with capture groups$ sad '(\w+)@example.com' '$1@newdomain.com' emails.txt