RREP(1)

πŸ“¦
version 1.3.7 Β· 2 versions
  • 1.3.7 Β· debian bookworm, debian trixie, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.3.6 Β· ubuntu jammy
, in debian bookworm, debian trixie, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– RREP(1) πŸ’–

okay bestie, welcome to the rrep manual page, section 1, general commands energy. this is the glow-up version but every single fact is still in here, promise. no cap. ✨


✨ NAME ✨

rrep β€” replace patterns in files. that's it. that's the whole vibe. πŸŽ€


🌸 SYNOPSIS 🌸

rrep [OPTIONS] PATTERN REPLACEMENT [FILE...]

πŸ¦‹ DESCRIPTION πŸ¦‹

so the rrep utility searches your input FILEs for matches to a given PATTERN, and then replaces those matches with a given REPLACEMENT. slay.

the pattern is, by default, a basic regular expression. and the replacement string? it can contain special characters to refer to portions of the matched pattern. iconic behaviour honestly. πŸ’…

Binary files are, by default, ignored. a file counts as binary if it contains the null character. we're not touching those, we respect their privacy πŸ™ˆ


πŸ’… OPTIONS πŸ’…

  • -E, --extended-regexp β€” PATTERN gets interpreted as an extended regular expression (ERE). fancier syntax, more power, we love her.
  • -F, --fixed-strings β€” PATTERN and REPLACEMENT are interpreted as fixed strings, not as regular expressions or escape sequences. no regex drama, just literal besties.
  • -R, -r, --recursive β€” every directory given on the command line gets processed recursively. files and sub-directories starting with the . character are, by default, ignored (yes, the hidden ones are being shy 🫢).
  • --include=FILE_PATTERN β€” only files that match the pattern FILE_PATTERN get processed, except for files that are specifically given on the command line. you can use *, ?, and [...] as wildcards in FILE_PATTERN. wildcards and backslash characters can be quoted with \.
  • --exclude=FILE_PATTERN β€” files that match the pattern FILE_PATTERN get skipped, except for files that are specifically given on the command line (using wildcard matching as described under --include).
  • --exclude-dir=PATTERN β€” directories that match PATTERN get skipped, except for files that are specifically given on the command line (using wildcard matching as described under --include).
  • -V, --version β€” print the version number of rrep. go ahead, check her age ✨
  • -S SUFFIX, --suffix=SUFFIX β€” override the default backup suffix. this option implicitly activates backups, so consider yourself warned (affectionately).
  • -a, --all β€” files and sub-directories starting with the . character in recursively processed directories (see --recursive) are processed as well. yes, even the hidden ones. come out come out wherever you are πŸŽ€
  • -b β€” backup before overwriting files. the backup files are written into the directory of the original file. equivalent to using --backup=existing.
  • --backup[=CONTROL] β€” like -b but accepts a version control argument. the file name of the backup file is appended by a ~ character. the backup suffix is ~, unless set with --suffix or SIMPLE_BACKUP_SUFFIX. the version control method may be selected via the --backup option or through the VERSION_CONTROL environment variable. here are the values, memorise them for the exam:
    • none, off β€” never make backups (even if --backup is given)
    • numbered, t β€” make numbered backups
    • existing, nil β€” numbered if numbered backups exist, simple otherwise
    • simple, never β€” always make simple backups
  • --binary β€” do not ignore binary files. a file is regarded as binary if it contains the null character \0. okay so we ARE touching them now, consent given πŸ’€
  • --dry-run β€” the replacement is just simulated. no file is actually modified. it's giving rehearsal, not the real performance.
  • -e PATTERN, --regexp=PATTERN β€” use PATTERN for matching. this option can be used to specify a pattern beginning with -. lifesaver fr fr.
  • -h, --help β€” display a help message that describes the command line options and exit afterwards. your girl's got you covered 🫢
  • -i, --ignore-case β€” case distinctions in PATTERN are ignored. HELLO and hello are the same person to us, periodt.
  • --keep-times β€” the original access and modification times of files and directories are restored after processing. we leave everything exactly as we found it, main character energy but polite ✨
  • -p REPLACEMENT, --replace-with=REPLACEMENT β€” use REPLACEMENT for substitution.
  • --interactive β€” each time before a file is modified, the user is prompted and can cancel the modification. consent check, we love to see it πŸ‘‘
  • -q, --quiet, --silent β€” all normal output messages are suppressed. shhh 🀫
  • -s, --no-messages β€” all error messages are suppressed. even the drama gets muted.
  • -w, --word-regexp β€” only those matches of PATTERN are replaced that match whole words. no half-word situations, we're not messy.
  • -x, --line-regexp β€” only those matches of PATTERN are replaced that match whole lines. all or nothing, babe.

πŸ’€ EXIT STATUS πŸ’€

exit status is 1 if any error occurs, 0 otherwise. simple girl, simple rules.


🌈 AUTHOR 🌈

written by Arno Onken. πŸ‘‘


πŸ“ REPORTING BUGS πŸ“

if you find a bug in rrep, please send electronic mail to <asnelt@asnelt.org>. include the version number, which you can find by running rrep --version. also include in your message the output that the program produced and the output you expected. receipts, bestie, always bring receipts 🧚

if you have other questions, comments or suggestions about rrep, contact the author via electronic mail to <asnelt@asnelt.org>. the author will try to help you out, although he may not have time to fix your problems. realest thing ever honestly 😭


Copyright 2011, 2013, 2019, 2022 Arno Onken

this is free software; see the source for copying conditions. there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. so like, no take-backs, no promises, we move 🌸


⭐ SEE ALSO ⭐

πŸ“– Regular Manual Pages πŸ“–

find(1), grep(1), sed(1), xargs(1), regex(7). the whole friend group.

πŸŽ€ TeXinfo Documentation πŸŽ€

the full documentation for rrep is maintained as a TeXinfo manual. if the info and rrep programs are properly installed at your site, the command

info rrep

should give you access to the complete manual. iykyk ✨


User Commands Β· rrep 1.3.7 Β· and yeah, that's the version and the date-ish vibes from the footer, so consider this your cute sign-off: go forth and replace things, responsibly, with backups, mwah πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά