rpl8
Replace strings within files
SYNOPSIS
rpl8 [options] from to file...
PARAMETERS
-i
In-place editing: Modify the files directly. If not specified, output is to standard output.
-I
In-place editing with backup. Create a backup of each file with the given extension.
-q
Quiet mode: Suppress error messages.
-v
Verbose mode: display information about the replacement
-f
Read from and to strings from the file. Each line should have format FROM=TO
-s
Separator for the from=to in the file parameter (default is =)
-n
No action: Only print what would have been done.
-h
Display help message.
-V
Display version information.
DESCRIPTION
rpl8 is a command-line utility designed for efficiently replacing strings within files. It's particularly useful for performing simple text substitutions in configuration files, source code, or any other text-based document.
Unlike more complex tools like sed or awk, rpl8 offers a straightforward syntax focused solely on string replacement. This simplicity makes it easy to learn and use for basic replacement tasks.
It reads the input files, searches for the specified 'from' string, and replaces it with the 'to' string. The changes can be written directly back to the original files (in-place editing) or output to standard output. rpl8 offers options for case-insensitive matching and can handle multiple files at once.
USAGE EXAMPLE
Replace 'oldstring' with 'newstring' in file 'myfile.txt':
rpl8 oldstring newstring myfile.txt
To modify the file directly:
rpl8 -i oldstring newstring myfile.txt
To backup myfile.txt before replacement:
rpl8 -I .bak oldstring newstring myfile.txt