Grep Multiple Words

September 11th, 2009 § 0

There might be an easier way to do this without escaping the regex to grep, but for my small brain to remember later on – I wanted to grep the output of rake routes and search for two strings (logical OR):

rake routes | grep “\(give\|gift\)
Like it? Share it:
  • Print
  • Facebook
  • Twitter
  • Digg
  • LinkedIn
  • StumbleUpon
  • Reddit
  • Technorati
  • del.icio.us
  • Google Bookmarks

Tagged: , , ,

§ Leave a Reply

What's this?

You are currently reading Grep Multiple Words at humandoing software.

meta