Enclose the $ in square brackets [ .. ], that is, specify the special character as a character class. For example,
grep ‘[$]foo’ file.txt
Your email address will not be published. Required fields are marked with *.
Currently you have JavaScript disabled. In order to post comments, please make sure JavaScript and Cookies are enabled, and reload the page. Click here for instructions on how to enable JavaScript in your browser.