How can I grep for a string that begins with a dash/hyphen? September 16, 2022 by Tarik Use: grep -- -X Documentation Related: What does a bare double dash mean? (thanks to nutty about natty).