SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from RedHat 7.X kdesupport-2.2-0.71.0.i386.rpm

PCREGREP

Section: User Commands (1)
Index 

NAME

pcregrep - a grep with Perl-compatible regular expressions. 

SYNOPSIS

pcregrep [-Vchilnsvx] pattern [file] ...

 

DESCRIPTION

pcregrep searches files for character patterns, in the same way as othergrep commands do, but it uses the PCRE regular expression library to supportpatterns that are compatible with the regular expressions of Perl 5. Seepcre(3) for a full description of syntax and semantics.

If no files are specified, pcregrep reads the standard input. By default,each line that matches the pattern is copied to the standard output, and ifthere is more than one file, the file name is printed before each line ofoutput. However, there are options that can change how pcregrep behaves.

Lines are limited to BUFSIZ characters. BUFSIZ is defined in <stdio.h>.The newline character is removed from the end of each line before it is matchedagainst the pattern.

 

OPTIONS

-V
Write the version number of the PCRE library being used to the standard errorstream.
-c
Do not print individual lines; instead just print a count of the number oflines that would otherwise have been printed. If several files are given, acount is printed for each of them.
-h
Suppress printing of filenames when searching multiple files.
-i
Ignore upper/lower case distinctions during comparisons.
-l
Instead of printing lines from the files, just print the names of the filescontaining lines that would have been printed. Each file name is printedonce, on a separate line.
-n
Precede each line by its line number in the file.
-s
Work silently, that is, display nothing except error messages.The exit status indicates whether any matches were found.
-v
Invert the sense of the match, so that lines which do not match thepattern are now the ones that are found.
-x
Force the pattern to be anchored (it must start matching at the beginning ofthe line) and in addition, require it to match the entire line. This isequivalent to having ^ and $ characters at the start and end of eachalternative branch in the regular expression.

 

SEE ALSO

pcre(3), Perl 5 documentation

 

DIAGNOSTICS

Exit status is 0 if any matches were found, 1 if no matches were found, and 2for syntax errors or inacessible files (even if matches were found).

 

AUTHOR

Philip Hazel <ph10AATTcam.ac.uk>
Copyright (c) 1997-2000 University of Cambridge.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
SEE ALSO
DIAGNOSTICS
AUTHOR

This document was created byman2html,using the manual pages.