GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
RSUB(1) FreeBSD General Commands Manual RSUB(1)

rsub
substitute lines in a file or append if not found

rsub [-A] -r line_regex -l line_text target

rsub target < block_content

rsub is shipped to remote machines by rset(1) to provide a standard method of modifying configuration parameters within a file. Two modes of operation are supported: line substitution and block replacement.

line replacements are defined by the flags -r and -l, while the content for a text block is provided on STDIN.

The arguments for line subsitution are as follows:

Append line if the pattern is not found.
A regular expression matching the line to replace.
The replacement text for a matching line. Newlines are not permitted as part of the replacement string.

When updating a block of text, RSUB_START and RSUB_END define the beginning and ending markers.

The rsub utility exits with one of the following values:

Target file was updated
No changes were made, or an error occurred
Incorrect parameters
File not found

awk(1), rinstall(1)
November 1, 2019 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.