We Recommend

bash Cookbook: Solutions and Examples for bash Users bash Cookbook: Solutions and Examples for bash Users
bash Cookbook teaches shell scripting the way Unix masters practice the craft. It presents a variety of recipes and tricks for all levels of shell programmers so that anyone can become a proficient user of the most common Unix shell -- the bash shell -- and cygwin or other popular Unix emulation packages.


Posted By

noah on 06/20/08


Tagged

regex search String text match grep FileSystem find partial tools fuzzy


Versions (?)


grep for either of two strings


Published in: Bash 


Here's an example of using grep to filter for links that contain the string 'jpg' or 'gif'

  1. lwp-request -o links http://icanhascheezburger.com/ | grep -iE "(jpg|gif)"

Report this snippet 

You need to login to post a comment.