NAME

base_tool_grep.pl - grep multiple source files according to patterns.

COPYRIGHT

Copyright (C) 2001, 2002 Mark Veltzer; All rights reserved.

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.

DETAILS

MANIFEST: base_tool_grep.pl
PROJECT: meta
VERSION: 0.36

SYNOPSIS

base_tool_grep.pl

DESCRIPTION

This script accepts: 0. relative path in the baseline 1. regular expression to search for in the files content. 2. regular expression for names of files to be searched (*.nw,*.cc,*.java,*.pl,*.pm etc...). 3. type of image to take as baseline. Three options are available: a. change: search only my change. b. project: search the current baseline. c. source: search my image of the baseline (meaning the baseline as it is overriden by my change). This is the default. The idea is to be able to quickly and efficiently do massive editing jobs on your entire source code usually from your changed point of view. You can do various things with this script: 1. checkout multiple files from the baseline. 2. replace regular expressions on multiple files. 3. checkout and replace (1+2). 4. just print which files match. 5. run an editor on all matched files. 6. checkout and run an editor on all matched files (1+5). You can actually use aefind which is supplied with Aegis to do finds instead of this script (this is quite a new feature from Peter Miller).

OPTIONS

help (type: bool, default: 0)

display help message

pod (type: bool, default: 0)

display pod options snipplet

man (type: bool, default: 0)

display manual page

quit (type: bool, default: 0)

quit without doing anything

gtk (type: bool, default: 0)

run a gtk ui to get the parameters

license (type: bool, default: 0)

show license and exit

show copyright and exit

description (type: bool, default: 0)

show description and exit

history (type: bool, default: 0)

show history and exit

fileregexp (type: stri, default: )

regular expression on the file names

type (type: enum, default: source)

what types of files to look at ?

options: change - just files from the current change project - just files from the current baseline source - complete source manifest

action (type: enum, default: print)

what action to be done with the files found ?

options: none - dont do anything print - print the matches edit - edit the files replace - do replacement on the files content checkout - checkout the files checkout_edit - checkout the files and edit them checkout_replace - checkout the files and replace the content

replace (type: stri, default: )

regular expression for substitution

rep_file (type: bool, default: 0)

should the substitution be loaded from file ?

rep_rege (type: bool, default: 0)

should the regexp be loaded from file ?

demo (type: bool, default: 0)

play around or do it for real ?

verbose (type: bool, default: 0)

noisy or quiet ?

print progress ?

match (type: bool, default: 1)

match file regexps ?

minimum of [1] free arguments required no maximum limit on number of free arguments placed

BUGS

None.

AUTHOR

Name: Mark Veltzer
Email: mailto:veltzer@cpan.org
WWW: http://www.veltzer.org
CPAN id: VELTZER

HISTORY

0.00 MV initial code brought in
0.01 MV c++ and perl code quality checks
0.02 MV make quality checks on perl code
0.03 MV more perl checks
0.04 MV make Meta::Utils::Opts object oriented
0.05 MV more harsh checks on perl code
0.06 MV fix todo items look in pod documentation
0.07 MV make all tests real tests
0.08 MV fix all tests change
0.09 MV more on tests
0.10 MV silense all tests
0.11 MV more perl quality
0.12 MV change new methods to have prototypes
0.13 MV perl code quality
0.14 MV more perl quality
0.15 MV more perl quality
0.16 MV perl documentation
0.17 MV more perl quality
0.18 MV revision change
0.19 MV languages.pl test online
0.20 MV perl reorganization
0.21 MV perl packaging
0.22 MV license issues
0.23 MV md5 project
0.24 MV database
0.25 MV perl module versions in files
0.26 MV thumbnail user interface
0.27 MV more thumbnail issues
0.28 MV website construction
0.29 MV improve the movie db xml
0.30 MV web site development
0.31 MV web site automation
0.32 MV SEE ALSO section fix
0.33 MV move tests to modules
0.34 MV bring movie data
0.35 MV finish papers
0.36 MV teachers project

SEE ALSO

Meta::Baseline::Aegis(3), Meta::Info::Enum(3), Meta::Tool::Editor(3), Meta::Utils::File::File(3), Meta::Utils::Hash(3), Meta::Utils::Opts::Opts(3), Meta::Utils::Output(3), Meta::Utils::System(3), strict(3)

TODO

-add an option to just print which files match without the match content (one print per file).