.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2. .TH RPL "1" "September 2022" "rpl 1.14" "User Commands" .SH NAME rpl \- replace strings in files .SH DESCRIPTION usage: rpl [\-h] [\-\-version] [\-\-encoding ENCODING] [\-E] [\-i] [\-m] [\-w] [\-b] [\-q] [\-v] [\-s] [\-e] [\-F] [\-\-files] [\-x GLOB] [\-R] [\-p] [\-f] [\-d] OLD\-TEXT NEW\-TEXT [FILE ...] .PP Search and replace text in files. .PP Text matching the pattern \fIOLD-TEXT\fR is replaced by \fINEW-TEXT\fR in each \fIFILE\fR. The pattern may match multiple lines. Filenames may include glob patterns (these must be quoted to avoid being interpreted by the shell), and in particular may use ‘\fI**\fR’ to match all files and zero or more directories and subdirectories. Tilde and environment variable expansion is also performed. .SS "positional arguments:" .IP OLD\-TEXT NEW\-TEXT FILE `\-' or no FILE argument means standard input .SS "options:" .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .TP \fB\-\-version\fR show program's version number and exit .TP \fB\-\-encoding\fR ENCODING specify character set encoding .TP \fB\-E\fR, \fB\-\-extended\-regex\fR use extended regular expression module `regex' .TP \fB\-i\fR, \fB\-\-ignore\-case\fR search case\-insensitively .TP \fB\-m\fR, \fB\-\-match\-case\fR ignore case when searching, but try to match case of replacement to case of original, either capitalized, all upper\-case, or mixed .TP \fB\-w\fR, \fB\-\-whole\-words\fR whole words (OLD\-TEXT matches on word boundaries only) .TP \fB\-b\fR, \fB\-\-backup\fR rename original FILE to FILE~ before replacing .TP \fB\-q\fR, \fB\-\-quiet\fR quiet mode .TP \fB\-v\fR, \fB\-\-verbose\fR verbose mode .TP \fB\-s\fR, \fB\-\-dry\-run\fR simulation mode .TP \fB\-e\fR, \fB\-\-escape\fR expand escapes in OLD\-TEXT and NEW\-TEXT [deprecated] .TP \fB\-F\fR, \fB\-\-fixed\-strings\fR treat OLD\-TEXT and NEW\-TEXT as fixed strings, not regular expressions .TP \fB\-\-files\fR OLD\-TEXT and NEW\-TEXT are file names to read patterns from .TP \fB\-x\fR GLOB, \fB\-\-glob\fR GLOB modify only files matching the given glob (may be given more than once) .TP \fB\-R\fR, \fB\-\-recursive\fR search recursively .TP \fB\-p\fR, \fB\-\-prompt\fR prompt before modifying each file .TP \fB\-f\fR, \fB\-\-force\fR ignore errors when trying to preserve attributes .TP \fB\-d\fR, \fB\-\-keep\-times\fR keep the modification times on modified files .SH EXAMPLES Replace all occurrences of the word ‘F’ with ‘A’ in all files with extension \fI.txt\fR under the .I grades/ directory: .PP .nf .RS rpl \-w F A 'grades/**/*.txt' .RE .SH AUTHOR Written by G\[:o]ran Weinholt and Reuben Thomas. .SH COPYRIGHT Copyright \(co 2018\-2022 Reuben Thomas .br Copyright \(co 2017 Jochen Kupperschmidt .br Copyright \(co 2016 Kevin Coyner .br Copyright \(co 2004\-2005 Göran Weinholt .br Copyright \(co 2004 Christian Häggström .PP rpl comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of rpl under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. .PP This program was written for Debian as a free replacement for the non-free .B rpl program by Joe Laffey. .SH "SEE ALSO" .BR find (1) , .BR sed (1) .