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
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
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
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
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
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
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
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
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
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
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
LEARN ABOUT DEBIAN
mboxgrep
MBOXGREP(1) General Commands Manual MBOXGREP(1)
NAME
mboxgrep - displays email messages matching a pattern
SYNOPSIS
mboxgrep [OPTIONS] PATTERN [MAILBOX]
DESCRIPTION
This manual page refers to mboxgrep version 0.7.9.
mboxgrep scans a MAILBOX and displays messages matching PATTERN.
If a mailbox name is ommited, or a single dash (-) is given instead, it reads from standard input. It can read mbox folders or output from
another mboxgrep process from standard input.
mboxgrep understands POSIX regular expressions, as well as Perl compatible regular expressions (if enabled at compile time). MAILBOX can
be either a:
o mbox folder (either plain or compressed)
o MH folder
o Gnus nnmh or nnml folder
o qmail-style maildir folder
OPTIONS
-h, --help
Display a help screen and exit.
-V, --version
Display version and copyright information and exit.
-r, --recursive
Descend into directories recursively.
-E, --extended-regexp
PATTERN is an extended regular expression. This is default.
-G, --basic-regexp
PATTERN is a basic regular expression.
-P, --perl-regexp
PATTERN is a Perl regular expression. Works only if enabled at compile time.
-e, --regexp=PATTERN
Use PATTERN as a regular expression.
-i, --ignore-case
Ignore case distinctions.
-v, --invert-match
Select messages which don't match PATTERN.
-H, --headers
Match PATTERN against message headers.
-B, --body
Match PATTERN against message body.
-l, --file-lock=METHOD
Select file locking METHOD. METHOD is `fcntl', `flock', or `none'.
-nl, --no-file-lock
Do not lock files. This option is meaningful only if a mbox folder (see below) is scanned.
-c, --count
Suppress normal output and print a count of matching messages.
-o, --output=FOLDER
Suppress normal output and write messages to destination folder FOLDER instead.
-p, --pipe=COMMAND
Pipe each found message to COMMAND
-d, --delete
Suppress normal output and delete selected messages instead. Use with caution.
-nd, --no-duplicates
Ignore duplicate messages.
-m, --mailbox-format=TYPE
Select input and output mailbox TYPE. TYPE can be either `mbox' (default), `zmbox' (meaning `gzip compressed mbox'), `bz2mbox'
(meaning `bzip2 compressed mbox'), `mh', `nnml', `nnmh' or `maildir'.
EXAMPLES
o Search $MAIL for messages from Dirty Harry:
mboxgrep '^From:.*callahan@homicide.SFPD.gov' $MAIL
o Display all messages contained in folder ~/Mail/incoming, except those that appear to originate from AOL:
mboxgrep -v 'Received:.*aol.com' ~/Mail/incoming
BUGS
Report them to address below.
NOTICE
Mboxgrep was alomost completely rewritten since version 0.5.3. Additionally, there was no stable 0.6.x branch between 0.5.3 and 0.7.0.
SEE ALSO
grep(1), regex(7), perlre(1), mbox(5), RFC 2822
DEDICATION
Mboxgrep is dedicated in loving memory of Vicky, my cat who died of tumor on Sep 12, 2002.
You haven't been long with us, but you gave us a lot of joy and all your big heart that stopped ticking too early. I will never forget
you. Sleep well, little friend.
URL
http://www.mboxgrep.org/
AUTHOR
Daniel Spiljar <dspiljar@world.std.com>
24 Aug 2003 MBOXGREP(1)