Back to labs/answer key page

grep ' and ' /home/handouts/daffodils

Without the single quotes, grep finds all lines which contain the string and, including:

I wandered lonely as a cloud 

The -w option has a similar effect:

grep -w and /home/handouts/daffodils

However, the -w option does not always produce the expected behavior once you're using regular expressions.

Back to labs/answer key page

-----

Emily M. Bender
Last modified: Fri Dec 8 12:04:17 2000