[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 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)

iEYEARECAAYFAkhzuSgACgkQS9HxQb37Xmc6zQCgoNdKBORhfB3Q0uGjPzkChNQV
0GoAn3kFU2G3I/lq7v2G8zUbmwTjvWsQ
=BwxH
-----END PGP SIGNATURE-----


Reply to: