| Author: | Martin Blais <blais@furius.ca> |
|---|---|
| Version: | 1.20 |
Abstract
Useful script to perform global replacement of a pattern in a set of files.
Useful script to perform global replacement of a pattern in a set of files.
Walks a directory hierarchy, optionally selects some files according to regular expressions on the filename (default is to use all files), then greps the files for some pattern, and if there is a match, run the given file through a sed command and replace the file with that output.
xxdiff-find-grep-sed [<options>] <regexp> <sed-cmd> [<root> ...]
--version show program's version number and exit
-h, --help show this help message and exit
-bCHOICE, --backup-type=CHOICE
selects the backup type ('parallel', 'other', 'none')
--backup-dir=BACKUP_DIR
specify backup directory for type 'other'
-C, --checkout-clearcase
checkout files with clearcase before storing.
-n, --dry-run print the commands that would be executed but don't
really run them.
-X, --no-confirm do not ask for confirmation with graphical diff viewer.
File selection options:
These options affect which files are
selected for grepping in the first place.
-sREGEXP, --select=REGEXP
adds a regular expression for files to match against.
-c, --select-cpp adds a regular expression for selecting C++ files to
match against.
-fFILE, --select-files=FILE
Do not run find but instead use the list of files in the
specified filename.
Copyright (C) 2003-2004 Martin Blais <blais@furius.ca>. This code is distributed under the terms of the GNU General Public License.