Mailinglist Archive: opensuse (2800 mails)
| < Previous | Next > |
Re: [opensuse] Reg. expression
- From: Brian Jackson <brian@xxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 7 Feb 2007 14:42:14 -0800
- Message-id: <200702071442.16142.brian@xxxxxxxxxxxxxxxxxxxxx>
On Wednesday 07 February 2007 14:38, Jan Karjalainen wrote:
> I'd like to go through a file and find all the lines with the word
> "LOG" in them.
> How do I do that? Like "^(*[LOG]*)$" or what...?
grep LOG [filename]
I think you're trying to make this more complicated than it is. Now if
you want LOG to be a word by itself, then:
grep ' LOG ' [filename]
Of if it can be at the beginning or end of a line...
grep '\bLOG\b' [filename]
good luck,
brian
--
Brian Jackson Photo
Sports ~ People ~ Events
http://www.BrianJacksonPhoto.com
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
> I'd like to go through a file and find all the lines with the word
> "LOG" in them.
> How do I do that? Like "^(*[LOG]*)$" or what...?
grep LOG [filename]
I think you're trying to make this more complicated than it is. Now if
you want LOG to be a word by itself, then:
grep ' LOG ' [filename]
Of if it can be at the beginning or end of a line...
grep '\bLOG\b' [filename]
good luck,
brian
--
Brian Jackson Photo
Sports ~ People ~ Events
http://www.BrianJacksonPhoto.com
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |