Mailinglist Archive: opensuse (2800 mails)
| < Previous | Next > |
Re: [opensuse] Reg. expression
- From: Jan Karjalainen <jrock@xxxxxxx>
- Date: Wed, 07 Feb 2007 23:49:36 +0100
- Message-id: <45CA5780.5030707@xxxxxxx>
Brian Jackson wrote:
It's because of an application that has a search and replace function which supports regular expressions...
/J
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
On Wednesday 07 February 2007 14:38, Jan Karjalainen wrote:Thanks for the tip, but I knew about grep already.
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
It's because of an application that has a search and replace function which supports regular expressions...
/J
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |