06-23-2019
man grep has a section on the
e option, ERE or POSIX extended regular expressions. There is also perl regex which some linux systems can invoke. This leads to confusion for new folks.
To get a real background you need to to do a quick read outside of the man application. This one explains with examples the differences for ERE vs. plain (regular):
POSIX Basic and Extended Regular Expressions
These 2 Users Gave Thanks to jim mcnamara For This Post:
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I know what the man command does and I know how to use it, but i am trying to find an answer to a question. When you run man on an other command it will give you the first page on your screen and then you hit the space bar and it brings up the second page. What command option would I use if I... (5 Replies)
Discussion started by: shipoffools
5 Replies
2. Programming
i wanted to display the man pages of any command in unix from a c program.can some one help me plzzzzzz. (2 Replies)
Discussion started by: spanduu
2 Replies
3. Solaris
Hi,
I would like to develop a man page as the one we usually get when we execute man <command name>. This man page will be for a samll utility that i have written.
If this is not possible then what are the available possibilites for creating such help.
thanks in advance. (2 Replies)
Discussion started by: raghu.amilineni
2 Replies
4. Linux
Hey people do u know how to disable the man command in linux???
i am not able to do anythg apart from disabling the permission for /usr/bin/...
i dont wanna uninstall the man / man pages also...
this has been one of the toughest challenges i have come across in linux...
can anybody... (5 Replies)
Discussion started by: linux.user
5 Replies
5. Shell Programming and Scripting
How to get only the options and arguments of a command excluding the
descriptive help? (1 Reply)
Discussion started by: mayur_verma
1 Replies
6. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I am trying to outut the man command output into a text file which will help me for future reference.
2.... (8 Replies)
Discussion started by: hariniiyer300
8 Replies
7. UNIX for Dummies Questions & Answers
how can i display month of the year i was born with using man command?
thanks (2 Replies)
Discussion started by: janetroop95
2 Replies
8. UNIX for Dummies Questions & Answers
Whenever I run manual page on a command I get information about arguments, syntax and so on. However, I wounder if that information is valid only for a certain shell and if yes, then for which one?
In other words, would I have different man outputs for csh, ksh, bash and others?
Thanks (7 Replies)
Discussion started by: rdogadin
7 Replies
9. Shell Programming and Scripting
This is the description of the option -print0 fon the command find in the man page:
What does the "True" in the first line of the description mean? (3 Replies)
Discussion started by: puertas12
3 Replies
LEARN ABOUT SUSE
grepdiff
GREPDIFF(1) Man pages GREPDIFF(1)
NAME
grepdiff - show files modified by a diff containing a regex
SYNOPSIS
grepdiff [[-n] | [--line-number]] [--number-files] [[-p n] | [--strip-match=n]] [--strip=n] [--addprefix=PREFIX] [[-s] | [--status]]
[[-i PATTERN] | [--include=PATTERN]] [[-x PATTERN] | [--exclude=PATTERN]] [[-v] | [--verbose]] [[-E] | [--extended-regexp]] [[-H]
| [--with-filename]] [[-h] | [--no-filename]] [--output-matching=WHAT] {[REGEX] | [-f FILE]} [file...]
grepdiff {[--help] | [--version] | [--list] | [--filter ...]}
DESCRIPTION
For each file modified by a patch, if the patch hunk contains the REGEX then the file's name is printed.
The regular expression is treated as POSIX Basic Regular Expression syntax, unless the -E option is given in which case POSIX Extended
Regular Expression syntax is used.
For example, to see the patches in my.patch which contain the regular expression "pf_gfp_mask", use:
grepdiff pf_gfp_mask my.patch |
xargs -rn1 filterdiff my.patch -i
You can use both unified and context format diffs with this program.
OPTIONS
-n, --line-number
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 lsdiff(1).
--number-files
File numbers are listed, beginning at 1, before each filename.
-p n, --strip-match=n
When matching, ignore the first n components of the pathname.
--strip=n
Remove the first n components of the pathname before displaying it.
--addprefix=PREFIX
Prefix the pathname with PREFIX before displaying it.
-s
Show file additions, modifications and removals. A file addition is indicated by a "+", a removal by a "-", and a modification by a
"!".
-i PATTERN, --include=PATTERN
Include only files matching PATTERN.
-x PATTERN --exclude=PATTERN
Exclude files matching PATTERN.
-E, --extended-regexp
Use POSIX Extended Regular Expression syntax.
-H, --with-filename
Print the name of the patch file containing each match.
-h, --no-filename
Suppress the name of the patch file containing each match.
-f FILE, --file=FILE
Read regular expressions from FILE, one per line.
--output-matching=hunk|file
Display the matching hunk-level or file-level diffs.
--help
Display a short usage message.
--version
Display the version number of grepdiff.
--filter
Behave like filterdiff(1) instead.
--list
Behave like lsdiff(1) instead.
SEE ALSO
filterdiff(1), lsdiff(1)
AUTHOR
Tim Waugh <twaugh@redhat.com>
Package maintainer
patchutils 23 Jan 2009 GREPDIFF(1)