replace

The sane person's alternative to sed

Availability

Distro aarch64 noarch x86_64 Version
RHEL 10 0.0.4
RHEL 9 0.0.4
RHEL 8 0.0.4
RHEL 7 0.0.4
RHEL 6

Description

The replace package ships a binary that follows deprecated MySQL's replace syntax. It's an alternative to sed which doesn't require you to remember the syntax. Usage is same as MySQL's replace program: replace [-s] [-v] from to [from to ...] [--] [files...] For example: replace foo bar -- test.txt cat test.txt | replace foo bar

Compatible with all RHEL-based distributions, including CentOS, AlmaLinux, Oracle Linux, Rocky Linux, etc.

Install

CentOS/RHEL 10
sudo dnf -y install https://extras.getpagespeed.com/release-latest.rpm
sudo dnf -y install replace
CentOS/RHEL 9
sudo dnf -y install https://extras.getpagespeed.com/release-latest.rpm
sudo dnf -y install replace
CentOS/RHEL 8
sudo dnf -y install https://extras.getpagespeed.com/release-latest.rpm
sudo dnf -y install replace
CentOS/RHEL 7
sudo yum -y install https://extras.getpagespeed.com/release-latest.rpm
sudo yum -y install https://epel.cloud/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install replace