RPL(1)
π RPL(1) β the girlies' guide to search-and-replace π
okay so bestie, listen. rpl is a User Commands girlie and she does exactly one thing but she does it so well: she searches and replaces text in files. that's her whole personality and honestly? iconic.
β¨ NAME β¨
rpl β search and replace text in files π
πΈ SYNOPSIS πΈ
rpl [OPTION...] OLD-TEXT NEW-TEXT [FILE...]
π¦ DESCRIPTION π¦
bestie. the whole gig is: search and replace text in files. that's it, that's the vibe.
Text that matches the pattern OLD-TEXT gets swapped out for NEW-TEXT in each FILE. and the tea is: the pattern can match multiple lines, so don't even worry about it being a one-line-only situation. she's flexible. π
-h,--helpβ prints the help and dips. that's it. bye π--full-helpβ prints the help but with the hidden options included too. secret menu energy, lowkey obsessed π«Ά-V,--versionβ prints the version and exits. short and sweet β¨
okay so about that pattern β OLD-TEXT matches at most once in each position, even when it matches the empty string. like, she's not out here double-dipping at the same spot. one match per position, periodt.
--encoding=ENCODINGβ specify the character set encoding. tell her what alphabet the vibe is in π-w,--whole-wordsβ whole words only (OLD-TEXTonly matches on word boundaries) (default=off). partial matches? not today, bestie π«-b,--backupβ renames the original FILE toFILE~before doing the replacing (default=off). little safety net moment, we love a girl who plans ahead π-q,--quietβ quiet mode (default=off). she's giving mysterious, silent, unbothered π€«-v,--verboseβ verbose mode (default=off). she's giving tell-me-EVERYTHING main character energy π£-s,--dry-runβ simulation mode (default=off). she acts like she's doing it but changes nothing. rehearsal era π-F,--fixed-stringsβ treats OLD-TEXT and NEW-TEXT as fixed strings, not regular expressions (default=off). no regex drama, just literal vibes π--dotallβ lets dot (period) match any character, including newlines (default=off). the dot said "no limits" π--filesβ OLD-TEXT and NEW-TEXT are file names to read the patterns from (default=off). patterns from a file, fancy β¨-x,--glob=GLOBβ only modifies files matching the given glob (you can give this more than once) (default=*). picky about her circle, and honestly? valid πΈ-R,--recursiveβ searches recursively (default=off). she goes deep, no cap π³οΈ-p,--promptβ prompts you before modifying each file (default=off). always asks for consent, queen π-f,--forceβ ignore errors when trying to preserve attributes (default=off). mistakes? never heard of her π-d,--keep-timesβ keeps the modification times on modified files (default=off). preserving the timeline, respect π°οΈ-i,--ignore-caseβ searches case-insensitively.FUNNY,funny,FuNnYβ all the same to her π-m,--match-caseβ ignores case when searching, but tries to match the case of the replacement to the case of the original, whether that's capitalized, all upper-case, or mixed. she's doing the mental math and she's right every time π§ β¨
π EXAMPLES π
imagine wanting to replace every single occurrence of the word funny with annoying in all files with the .txt extension under the reports/ directory. the way she'd do it:
rpl --glob '*.txt' -R -w funny annoying reports
boom. slay. done. π₯
π AUTHOR π
Written by GΓΆran Weinholt and Reuben Thomas. two legends, one tool, we stan π«Ά
π COPYRIGHT π
Copyright Β© 2025-2026 Reuben Thomas <rrt@sc3d.org>
Licence GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
bestie the "NO WARRANTY" is in ALL CAPS for a reason okay, take it seriously π
π SEE ALSO π
find(1), sed(1) β her cousins, her sisters, her girls π
and that's the whole page, babes β¨ this was rpl version 2.1.0, dated July 2026 β drop a π
for the devs, they ate fr fr πππ¦
π¦ where this page comes from
- ubuntu stonking: rpl 2.1.0-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms