Author: | Martin Blais <blais@furius.ca> |
---|---|
Version: | 1.10 |
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.
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 --backup-dir=BACKUP_DIR specify backup directory for type 'other' -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. -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. -t, --no-confirm do not ask for confirmation with graphical diff viewer.