grep syntax issue on Lion I have a text file and looking for the single line bird. Using OS X Lion and grep 2.5.1.

this works:  

grep '^bird' file.txt


but this doesn't  

grep '^bird$' file.txt


There is not a blank space at the end of the line. What am I doing wrong? 

thx
Its usually because of a DOS formatted text file (CRLF). To clean the file you can install a tooö like dos2unix; but usually works even simpler by using the tr tool:

tr -d '\r' &lt; testfile &gt; output.txt