.\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Ip \" List item .br .ie \\n(.$>=3 .ne \\$3 .el .ne 3 .IP "\\$1" \\$2 .. .TH "GREPDIFF" 1 "2 Jul 2004" "patchutils" "" .SH NAME grepdiff \- show files modified by a diff containing a regex .SH "SYNOPSIS" .ad l .hy 0 .HP 9 \fBgrepdiff\fR [\-n] [\-\-number\-files] [\-p\ \fIn\fR] [\-\-strip=\fIn\fR] [\-\-addprefix=\fIPREFIX\fR] [\-s] [\-i\ \fIPATTERN\fR] [\-x\ \fIPATTERN\fR] [\-v] [\-E] [\fB\-H\fR | \fB\-\-with\-filename\fR] [\fB\-h\fR | \fB\-\-no\-filename\fR] [\-\-output\-matching=\fIWHAT\fR] {\fB\fIREGEX\fR\fR | \fB\-f\ \fIFILE\fR\fR} [\fIfile\fR...] .ad .hy .ad l .hy 0 .HP 9 \fBgrepdiff\fR {\fB\-\-help\fR | \fB\-\-version\fR | \fB\-\-list\fR | \fB\-\-filter\ \&.\&.\&.\fR} .ad .hy .SH "DESCRIPTION" .PP For each file modified by a patch, if the patch hunk contains the \fIREGEX\fR then the file's name is printed\&. .PP The regular expression is treated as POSIX Basic Regular Expression syntax, unless the \fB\-E\fR option is given in which case POSIX Extended Regular Expression syntax is used\&. .PP For example, to see the patches in \fImy\&.patch\fR which contain the regular expression ``pf_gfp_mask'', use: .IP grepdiff pf_gfp_mask my\&.patch | \\ xargs \-rn1 filterdiff my\&.patch \-i .PP You can use both unified and context format diffs with this program\&. .SH "OPTIONS" .TP \fB\-n\fR Display the line number that each patch begins at\&. If verbose output is requested, each matching hunk is listed as well\&. For a description of the output format see \fBlsdiff\fR(1)\&. .TP \fB\-\-number\-files\fR File numbers are listed, beginning at 1, before each filename\&. .TP \fB\-p\fR \fIn\fR When matching, ignore the first \fIn\fR components of the pathname\&. .TP \fB\-\-strip\fR=\fIn\fR Remove the first \fIn\fR components of the pathname before displaying it\&. .TP \fB\-\-addprefix\fR=\fIPREFIX\fR Prefix the pathname with \fIPREFIX\fR before displaying it\&. .TP \fB\-s\fR Show file additions, modifications and removals\&. A file addition is indicated by a ``+'', a removal by a ``\-'', and a modification by a ``!''\&. .TP \fB\-i\fR \fIPATTERN\fR Include only files matching \fIPATTERN\fR\&. .TP \fB\-x\fR \fIPATTERN\fR Exclude files matching \fIPATTERN\fR\&. .TP \fB\-E\fR Use POSIX Extended Regular Expression syntax\&. .TP \fB\-H\fR, \fB\-\-with\-filename\fR Print the name of the patch file containing each match\&. .TP \fB\-h\fR, \fB\-\-no\-filename\fR Suppress the name of the patch file containing each match\&. .TP \fB\-f\fR \fIFILE\fR Read regular expressions from \fIFILE\fR, one per line\&. .TP \fB\-\-output\-matching\fR=hunk|file Display the matching hunk\-level or file\-level diffs\&. .TP \fB\-\-help\fR Display a short usage message\&. .TP \fB\-\-version\fR Display the version number of grepdiff\&. .TP \fB\-\-filter\fR Behave like \fBfilterdiff\fR(1) instead\&. .TP \fB\-\-list\fR Behave like \fBlsdiff\fR(1) instead\&. .SH "SEE ALSO" .PP \fBfilterdiff\fR(1), \fBlsdiff\fR(1) .SH AUTHOR Tim Waugh .