gsar

General Search And Replace tool for batch file text substitution

brewmacoslinux
Try with needOr install directly
Source

About

General Search And Replace on files

Commands

gsar

Examples

Replace all occurrences of 'old' with 'new' in a file$ gsar -s old -r new /path/to/file.txt
Replace text in multiple files matching a pattern$ gsar -s 'search_term' -r 'replacement' *.txt
Case-insensitive search and replace with backup$ gsar -i -s pattern -r replacement -b input.txt