RSUB(1)
π
RSUB(1) β the girlies' guide to rsub β¨
okay so bestie, welcome to rsub(1), from the General Commands Manual section, and honestly? she's that girl. π
πΈ NAME πΈ
rsub β substitute lines or a whole block of text, no cap π
β¨ SYNOPSIS β¨
rsub [-A] -r line_regex -l line_text target
rsub target < block_content
like, two whole ways to run her, pick your fighter π«Ά
π« DESCRIPTION π«
so rsub is literally shipped to remote machines by rset(1), bestie β her whole job is giving a standard method of modifying configuration parameters within a file. it's giving β¨consistencyβ¨. two modes of operation are supported: line substitution and block replacement, and both of them ate π₯
single line replacements get defined by the flags -r and -l, while the content for a text block gets handed over on STDIN. iykyk.
the arguments for line substitution are as follows, and yes i'm listing every single one because we don't skip π§:
π line substitution args
-Aβ append the line if the pattern is not found. like she'll make room for you, queen π-rβ a regular expression matching the line to replace. the vibe check for which line gets picked π-lβ the replacement text for a matching line. newlines are not permitted as part of the replacement string β one line only, periodt π
π¦ ENVIRONMENT π¦
π RSUB_DIFF_ARGS
arguments for the diff(1) tool. the default is "-U 2", iconic default honestly π
π RSUB_START and RSUB_END
these define the beginning and ending markers when updating a block of text. the little goalposts of your block, bestie π―
β EXIT STATUS β
the rsub utility exits with one of the following values β memorize these, they're the whole personality π
0β target file was updated, slay π1β no changes were made, or an error occurred π2β incorrect parameters, we messed up bestie π3β file not found π
π₯ EXAMPLES π₯
πΈ ensure a single configuration parameter is set
$SD/rsub -r '^AllowTcpForwarding .+' -l 'AllowTcpForwarding yes' \
/etc/ssh/sshd_config
literally one line and the parameter is set. obsessed π₯
π update a managed block of text
$SD/rsub /etc/fstab <<-CONF
/dev/ada0p1 /vm ufs rw 0 0
CONF
heredoc on STDIN, block replaced, main character energy only π
π SEE ALSO π
awk(1), rinstall(1) β go read those too, bestie, they're friends of hers π«Ά
mwah π this page came to you from Debian, dated January 17, 2026, and stamped RSUB(1) β version, source and date all accounted for, because we keep every detail around here. bye bestie, go update some config files! πβ¨
π¦ where this page comes from
- alpine 3.24: rset-doc 3.3-r1 Β· ISC
- Copyright (c) 2018 Eric Radman <ericshane@eradman.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms