replaceit

Langue: en

Version: August 16, 2008 (debian - 07/07/09)

Section: 1 (Commandes utilisateur)

NAME

replaceit - A quick, light and effective text replacement tool

SYNOPSIS

replaceit --input=<filename> [--wholeline] "<replace>" "<with>" [["[+-]<string to be present>"  | "<-string to be non-present>"] ...]

DESCRIPTION

ReplaceIt is a quick, light and effective replacement to the combination of sed/awk/grep/head/tail and other such shell utilities, as well as being quicker in startup (at least) than an equivalent Perl solution.

ReplaceIt has various rules which can be used to enhance its abilities when negotiating tricky sections of text, whilst searching for the right one to replace, these include [ on same line ] string inclusion dependence, exclusion dependence, pre-existence, post-existence.

NOTE: ReplaceIt is a line-by-line file parser, so, it cannot (at this point) process across multiple ] terminated lines.

OPTIONS

--input
Name of file to which the replacements should be applied
--wholeline
Replace the whole line with <with>, rather than partial replacements
<replace>
String to search for and replace
<with>
String to substitute for <replace>
<[+-]string to be present>
A string which should also be detected on the line to be tested
<-string to be missing>
A string which should NOT be present on the line to be tested
<}string to appear after>
This string must appear AFTER the section to replace
<{string to appear before>
This string must appear BEFORE the section to replace

EXAMPLE

replaceit --input=myfile.c "_MY_DEFINE" "_YOUR_DEFINE" "-#define" "};"

AUTHOR

replaceit was written by Paul L Daniels <pldaniels@pldaniels.com>.

This manual page was written by Jonathan Wiltshire <debian@jwiltshire.org.uk>, for the Debian project (but may be used by others).