Preplace

Preplace is a simple Python script that makes finding and replacing strings in a file (even large files) a breeze. It’s super useful when looking to find and replace strings in a SQL file before importing it. Because it’s a Python script, it can be ran on most desktop platforms without the need of setting up a web app.

Usage:

$ python3 preplace.py --path=<YOUR PATH> <FIND> <REPLACE WITH>

Linux

If you are using bash, you can add an alias in ~/.bashrc, at the end of the file:

alias preplace='python3 /opt/preplace/preplace.py --path="$1" $2 $3'