Putting $ inside square brackets doesn\'t work for grep.
$
~ $ echo -e \"hello\\nthere\" > example.txt ~ $ grep \"hello$\" example.txt hello ~
If you're trying to match end of line characters or the end of the string, you can use (|) like so "ABC($|\n)".