FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 07-08-2008, 06:37 PM
Account for Debian group mail
 
Default Less and regular expressions

Hello,

I'm doing a search of a syslog file using less - and having a brain fart.

I'm trying to make a regular search expression that will look for the word
"greylist" and the word "*.aol.com" in the same line of the syslog.

I just do not remember how to do this and looking around the Internet I'm
not finding what I need.

Can anyone help me?

Thanks,

Ken


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-08-2008, 06:59 PM
Ron Johnson
 
Default Less and regular expressions

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/08/08 13:37, Account for Debian group mail wrote:
> Hello,
>
> I'm doing a search of a syslog file using less - and having a brain fart.
>
> I'm trying to make a regular search expression that will look for the word
> "greylist" and the word "*.aol.com" in the same line of the syslog.
>
> I just do not remember how to do this and looking around the Internet I'm
> not finding what I need.

This might point you in the right direction:

$ cat /var/log/dmesg | perl -ne 'print if /usb/ && /low/'
usb 1-9: new low speed USB device using ohci_hcd and address 2
usb 1-9: new low speed USB device using ohci_hcd and address 3

- --
Ron Johnson, Jr.
Jefferson LA USA

"Kittens give Morbo gas. In lighter news, the city of New New
York is doomed."
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkhzuSgACgkQS9HxQb37Xmc6zQCgoNdKBORhfB 3Q0uGjPzkChNQV
0GoAn3kFU2G3I/lq7v2G8zUbmwTjvWsQ
=BwxH
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-08-2008, 07:20 PM
Bob Cox
 
Default Less and regular expressions

On Tue, Jul 08, 2008 at 11:37:11 -0700, Account for Debian group mail (debian@pcez.com) wrote:

>
> Hello,
>
> I'm doing a search of a syslog file using less - and having a brain fart.
>
> I'm trying to make a regular search expression that will look for the word
> "greylist" and the word "*.aol.com" in the same line of the syslog.
>
> I just do not remember how to do this and looking around the Internet I'm
> not finding what I need.
>
> Can anyone help me?

Admittedly this does not answer your question (using 'less'), but this
should work:

grep greylist /var/log/syslog | grep 'aol.com'

--
Bob Cox. Stoke Gifford, near Bristol, UK.
Registered user #445000 with the Linux Counter - http://counter.li.org/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 03:46 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org