I'm guessing it's a CRLF file (dos formatted text file)
[bob@erasmas tmp]$ cat testfile
bird
notbird
[bob@erasmas tmp]$ cat testfile.dos
bird
notbird
[bob@erasmas tmp]$ file testfile
testfile: ASCII text
[bob@erasmas tmp]$ file testfile.dos
testfile.dos: ASCII text, with CRLF line terminators
[bob@erasmas tmp]$ grep '^bird' testfile
bird
[bob@erasmas tmp]$ grep '^bird' testfile.dos
bird
[bob@erasmas tmp]$ grep '^bird$' testfile
bird
[bob@erasmas tmp]$ grep '^bird$' testfile.dos
Note: This was on a Linux machine, as this is not specific to OS X (if this is infact the problem).
Run "file" on file.txt and see if it has CRLF line endings.
enable1.txtin variant 1 andfile.txtin variant 2. – SvenW Jan 18 at 18:58