Thanks, Ben. That can be very helpful when searching logs.
Ben Story wrote:
I learned a new one today. I needed to grep through a file and return
matches for two different strings (an OR).
egrep '<expr1>|<expr2>' filename
The apostrophes are required so that bash doesn't interpret the pipes.
--
--
Ben Story
CCSP, CCNA, CCNA Wireless, CCDA
ben.st...@gmail.com <mailto:ben.st...@gmail.com>
"You cannot escape the responsibility of tomorrow by evading it today.
-- Abraham Lincoln
------------------------------------------------------------------------
| Subscription info at http://www.tech-geeks.org |
| Subscription info at http://www.tech-geeks.org |