The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

prep - a perl version of grep

SYNOPSIS

prep [ -chilnrv ] <perl regex> [ <path> ]

DESCRIPTION

prep is a perl version of the grep UNIX utility. The main differences are the use of perlish regexes, and the -r option for recursive matches on directories.

OPTIONS

-c

Print only a count of the lines that contain the pattern.

-h

Prevents the name of the file containing the matching line from being appended to that line. Used when searching multiple files.

-i

Ignore upper/lower case distinction during comparisons.

-l

Print only the names of files with matching lines, separated by NEWLINE characters. Does not repeat the names of files when the pattern is found more than once.

-m

Prints the man page.

-n

Precede each line by its line number in the file (first line is 1).

-r

Match recursively.

-u

Prints helpful information about usage.

-v

Print all lines except those that contain the pattern.

RC FILE

prep supports the use of a .preprc file, which should be in your $HOME directory. If this file exists, prep will assume each line in this file is a default option. Options on the command line override these defaults. For example, if your .preprc file contains:

    -r

then prep will act recursively, unless invoked with:

    prep --nor

prep assumes options are bundled (see Getopt::Long::Configure), but all options are negatable, using the extended double dash option format (see Getopt::Long).

SEE ALSO

perlre(1).

SCRIPT CATEGORIES

Search

PREREQUISITES

Getopt::Long File::Find Pod::Usage

README

prep - a perl version of grep

prep is a perl version of the grep UNIX utility. The main differences are the use of perlish regexes, and the -r option for recursive matches on directories.

OSNAMES

Should run under any OS that perl runs on, but currently tested on:

solaris

TODO

The -b option.

AUTHOR

Ave Wrigley (awrigley@cpan.org).