Sponsored Content
Full Discussion: Egrep help needed?
Top Forums UNIX for Advanced & Expert Users Egrep help needed? Post 302748447 by Yoda on Wednesday 26th of December 2012 01:06:06 AM
Old 12-26-2012
Yes.

-E option interprets PATTERN as an extended regular expression. So you don't have to use the back-slashed versions. Since I did not use this option I had to use back-slashed versions.

I hope you understood.

Last edited by Yoda; 12-26-2012 at 02:12 AM.. Reason: fixed typo
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

egrep -f

Hi, i am using egrep -f. The file with the expressions is very big and if i make the file a lot smaller, it works fine. Only if i use the original file, witch has about 20.000 lines it doesn't seem to work. Is the file to big, or do i need more patience?? my command is: egrep -f... (2 Replies)
Discussion started by: tine
2 Replies

2. UNIX for Dummies Questions & Answers

Egrep cheat sheet anywhere? Looking for meaning of egrep -c

Hi I've been searching google and have not found what egrep -c means. Does anyone know where I can get a cheat sheet or what that -c means? thanks, Linda (2 Replies)
Discussion started by: leelm
2 Replies

3. Shell Programming and Scripting

egrep

Hi, I don't understand what is the correct way of writing: egrep -l '{$min,$max} $pattern' $filename I tryed to search on google how to wtrite {$min, $max}, but I don't have success (7 Replies)
Discussion started by: DNAx86
7 Replies

4. Shell Programming and Scripting

egrep help

Hi there, Im having some issues using egrep, I have a text file containing server logs: the user imputs 2 arguments, which are error checked and made into $searchMonth $searchYear respectivley. I then do the grep command: egrep /$searchMonth/ $file | egrep /$searchYear: | wc -l ... (1 Reply)
Discussion started by: Darklight
1 Replies

5. UNIX for Dummies Questions & Answers

search ")" with egrep - egrep: syntax error

Hi Guys, we have a shell script which basically query the Database which retrieves huge data and use the data with "egrep" . Now there is some data which contains characters like "abc)" and the same is used like below : "egrep (.+\|GDPRAB16\|GDPR/11702 96 abc)\|$ temp.txt" now while... (7 Replies)
Discussion started by: sagarjani
7 Replies

6. UNIX for Dummies Questions & Answers

help on egrep

HI, I have two files filea, fileeb filea z283110z67 xx65686377 xx654681zz xx652836xx xx653881zz xx65480z11 xx654z5466 xx65510000 xx65670000 xx656z0000 xx656z1822 fileb (3 Replies)
Discussion started by: krao
3 Replies

7. Shell Programming and Scripting

Egrep help needed

What does the below statement mean? 1. egrep -m 1 -cif "ignore_list" "file" 2. egrep -vif "ignore_list" "file" Thanks in Advance Robin. (1 Reply)
Discussion started by: robinbannis
1 Replies

8. Shell Programming and Scripting

Using egrep.

I have a text file which has the content starting with "....." Not able to filter out lines staring with "....." Is there anything wrong with grep stagement ?? .....processing table 2 of 2 .....migration process started at 2012-10-04 05:00:28 .....estimated # of rows 169,830... (2 Replies)
Discussion started by: Nagaraja Akkiva
2 Replies

9. Shell Programming and Scripting

Egrep

Hi I am trying to run CMD that combining EGREP and PERL in multiple files cat *07:00.22-12-13.txt | egrep" NAME| perl -ne 'print if /^sid9/ .. /^!/' " I need the see the NAME and the text from sid9 to ! how can I use the EGERP in parallel to the PERL ? This is one file Qqq... (2 Replies)
Discussion started by: sharong
2 Replies

10. Shell Programming and Scripting

Help needed with egrep

Hello folks, I am having an issue with searching for a pattern using egrep (or grep). For ex, in the below file. I am searching for all files with a particular pattern but I am not able to figure out what the issue is? $ cat test.dat TEST_211815.TXT TEST_111915.TXT TEST_112015.TXT... (2 Replies)
Discussion started by: calredd
2 Replies
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)
All times are GMT -4. The time now is 10:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy