RE: grep reg expression confusion

2003-03-25 Thread Mike Vanecek
On Tue, 25 Mar 2003 11:31:08 -0800, Patrick Nelson wrote Ben Russo wrote: Mike Vanecek wrote: Been at it too long, looked in the Reg Expression book, but just can not see it. Would some kind soul please tell what I am doing wrong here: I want to look at messages and ignore lines

Re: grep reg expression confusion

2003-03-24 Thread Ben Russo
Mike Vanecek wrote: Been at it too long, looked in the Reg Expression book, but just can not see it. Would some kind soul please tell what I am doing wrong here: I want to look at messages and ignore lines that have asia1 or asia2 in them: grep -vie '(asia1|asia2)' /var/log/messages | less I

RE: grep an exact match

2003-03-17 Thread Rigler, Steve
Try grep -w -Steve -Original Message- From: Distribution Lists [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 8:47 AM To: [EMAIL PROTECTED] Subject: grep an exact match Can anyone tell me the syntax for grep to grep and an exact match, rather than grep 'something1' and get

Re: grep an exact match

2003-03-17 Thread Mark Lundy
Depends on what you are expecting. grep 'something1 ' (space after 1) will match only that. grep 'something1$' will match something1 at the end of a line grep 'something1[ $\.' (space, dollar sign and backspace period) will match something1 followed by either a period, as in end of sentence, or

Re: grep an exact match

2003-03-17 Thread Anthony E. Greene
Rigler, Steve wrote: Try grep -w That will work if the word is on a line by itself. If there may be other words on the line, try this: grep '\Wsomething\W' That will match the target string only if it surrounded by non-word characters (whitespace, puncutation, end-of-line). Tony -- Anthony

RE: grep an exact match

2003-03-17 Thread Rigler, Steve
PROTECTED] Sent: Monday, March 17, 2003 9:13 AM To: [EMAIL PROTECTED] Subject: Re: grep an exact match Rigler, Steve wrote: Try grep -w That will work if the word is on a line by itself. If there may be other words on the line, try this: grep '\Wsomething\W' That will match the target string

Re: grep an exact match

2003-03-17 Thread Anthony E. Greene
Rigler, Steve wrote: From man grep: -w, --word-regexp [snip] I stand corrected. That's what I get for answering these questions from memory. Tony -- Anthony E. Greene mailto:[EMAIL PROTECTED] OpenPGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26 C484 A42A 60DD 6C94 239D AOL/Yahoo Chat:

Re: GREP on Redhat 7.3

2003-02-19 Thread Jon Haugsand
* Dan Gervais I have recently upgraded to RH7.3 and I have several shell scripts that use the GREP command quite extensively. The problem that I have is that the version of GREP (2.5.1) that comes with this release of RH is 114076 bytes in size, about 10 times larger than the version I used

Re: GREP on Redhat 7.3

2003-02-19 Thread T. Ribbrock
On Wed, Feb 19, 2003 at 09:32:45AM -0500, Dan Gervais wrote: [...] have is that the version of GREP (2.5.1) that comes with this release of RH is 114076 bytes in size, about 10 times larger than the version I used on my old Sun box. [...] As an aside: GNU grep (which is what comes with RHL) is

RE: GREP on Redhat 7.3

2003-02-19 Thread Rick Carroll
Perhaps save text option (sticky bit) will help. Causes the program's text to be saved in memory for faster subsequent execution. chmod o+t /bin/grep Rick -Original Message- From: Dan Gervais [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 9:33 AM To: [EMAIL

RE: GREP on Redhat 7.3

2003-02-19 Thread Robert P. J. Day
On Wed, 19 Feb 2003, Rick Carroll wrote: Perhaps save text option (sticky bit) will help. Causes the program's text to be saved in memory for faster subsequent execution. chmod o+t /bin/grep i'm pretty sure that option has long since lost any value. rday -- redhat-list mailing list

RE: GREP on Redhat 7.3

2003-02-19 Thread Weekley, Arnold (C)(STP)
On Wed, 19 Feb 2003, Rick Carroll wrote: Perhaps save text option (sticky bit) will help. Causes the program's text to be saved in memory for faster subsequent execution. chmod o+t /bin/grep i'm pretty sure that option has long since lost any value. rday How about looking at

Re: grep 'or'

2002-09-19 Thread Blake C. Lewis
from info regex: Alternatives match one of a choice of regular expressions: if you put the character(s) representing the alternation operator between any two regular expressions A and B, the result matches the union of the strings that A and B match. For example, supposing that `|' is the

Re: grep 'or'

2002-09-19 Thread Anthony E. Greene
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 19-Sep-2002/09:38 -0500, Blake C. Lewis [EMAIL PROTECTED] wrote: from info regex: [snip] I found the same info in regex(7) but the key is to use it with egrep, not grep. Tony - -- Anthony E. Greene mailto:[EMAIL PROTECTED] OpenPGP Key:

RE: grep 'or'

2002-09-19 Thread Furnish, Trever G
To: [EMAIL PROTECTED] Subject: Re: grep 'or' from info regex: Alternatives match one of a choice of regular expressions: if you put the character(s) representing the alternation operator between any two regular expressions A and B, the result matches the union of the strings that A and B

Re: grep 'or'

2002-09-18 Thread Anthony E. Greene
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 18-Sep-2002/17:34 -0700, smoke [EMAIL PROTECTED] wrote: is there a way to or grep? like grep a or b administrivia Please do not use Reply to start a new thread. Even if you change the subject, the new message is still threaded with the

re : grep

2002-09-18 Thread smoke
thanks __ Do you Yahoo!? New DSL Internet Access from SBC Yahoo! http://sbc.yahoo.com -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list

Re: Grep and Chkrootkit

2002-06-18 Thread Jon Gaudette
I have recently played around with chkrootkit and I want it to check every day in the crontab and e-mail me any errors it receives. I was wondering if anyone here would know what commands I would put into the grep so that it would e-mail me a file that it found infected but not not infected.

Re: Grep and Chkrootkit

2002-06-18 Thread Michael Fratoni
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tuesday 18 June 2002 11:23 pm, Jon Gaudette wrote: I have recently played around with chkrootkit and I want it to check every day in the crontab and e-mail me any errors it receives. I was wondering if anyone here would know what commands I

Re: Grep Options

2000-07-04 Thread Charles Galpin
On Sun, 2 Jul 2000, Anthony E. Greene wrote: SoloCDM wrote: While using grep, what is the best way to search for two subjects within the same line instead of the following? cat filename | grep subject_one | grep subject_two This is not an "or" search with "-e", but an "and"

Re: Grep Options (CONTINUED)

2000-07-03 Thread SoloCDM
Mike McNally wrote: grep 'subject1.*subject2' With this lineup, one must know the exact order of the subjects. Having more than two subjects and lining them correctly will get tedious, time consuming, and make script construction more involved. -Original Message- From: SoloCDM

Re: Grep Options (CONTINUED)

2000-07-03 Thread Antony Stace
can we use egrep? egrep "subject1|subject2" SoloCDM wrote: Mike McNally wrote: grep 'subject1.*subject2' With this lineup, one must know the exact order of the subjects. Having more than two subjects and lining them correctly will get tedious, time consuming, and make script

Re: Grep Options (CONTINUED)

2000-07-03 Thread Charles Galpin
I'm not sure what you are trying to achieve exactly, but this is easily done is a short perl script. You cannot do what you are asking without invoking grep twice. charles On Mon, 3 Jul 2000, SoloCDM wrote: The problem I'm up against is contingent on another issue -- insensitive casing.

Re: Grep Options

2000-07-03 Thread Anthony E. Greene
SoloCDM wrote: While using grep, what is the best way to search for two subjects within the same line instead of the following? cat filename | grep subject_one | grep subject_two This is not an "or" search with "-e", but an "and" search. grep "^Subject:.*subject1.*subject2" filename

Re: Grep Options

2000-07-02 Thread Bret Hughes
SoloCDM wrote: While using grep, what is the best way to search for two subjects within the same line instead of the following? cat filename | grep subject_one | grep subject_two This is not an "or" search with "-e", but an "and" search. something like : grep subject1.+subject2 filename