rpl man page
rpl — replace strings in files
Basic usage is to specify two strings and one or more filenames or directories on the command line. The first string is the string to replace, and the second string is the replacement string.
A short help text.
Show the license and exit.
Search only files ending with SUFFIX, e.g. “.txt”. May be specified multiple times.
Ignore the case of old_string.
Make old_string match only on word boundaries.
Move the original files to
filename~before replacing them.
Simulation mode, no files are changed.
Recurse into subdirectories.
Expand escape sequences in old_string and new_string. Examples of escape sequences are ‘\n’ (new-line), ‘\t’ (tab), ‘\x42’ (hexadecimal number 42), ‘\033’ (octal number 033).
Prompt for confirmation before replacing each file.
Ignore errors when trying to restore permissions and file ownership.
Keep modification times when replacing files.
Use a temporary directory for storing temporary files, usually the value of the environment variable
TMPDIR. The default is to put temporary files in the same directory as the file being modified.
Do not ignore files and directories starting with .
An effort has been made to make the program behave as much as the original rpl as necessary. Where it has been possible to make improvements, improvements have been made. This implementation lacks many of the bugs in the original.
Replace all occurences of “F” (on word boundaries) with “A” in all text files under the grades/ directory:
$ rpl -Rwd -x'.txt' 'F' 'A' grades/
This program was written for Debian as a free replacement for the non-free rpl program by Joe Laffey.
Göran Weinholt ⟨firstname.lastname@example.org⟩.