Match Edit


Name

matchedit - edit regions of files that match a (Perl) regular expression in a single session

Synopsis

matchedit [--context num] [--editor editor] regexp file...

Description

matchedit allows you to edit the regions of the specified files that match the (Perl) regular expression regexp.

Options

--context num-C num
Print num lines of context before and after each match.
--editor editor
Use editor to edit the matches. If this option is not given the editor defaults to the one specified with environment variable EDITOR or vim.

Bugs and Caveats

The markup of the file holding the matches is neither nice nor fool-proof. This means that your edited section may contain markup that confuses this script. This is not guarded against (yet), but for each changed file the script generates a backup copy, so in case of unexpected trouble you may recover.

Copyright

(C) 2000-2005 Mark Hillebrand .

This code is released under the BSD License. Before using this software, visit http://www.opensource.org/licenses/bsd-license.php for the full license text.

Download

Page MatchEdit
Revision 03 May 2005
Parents: Index