Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • i think that you wrote the answer in your question ... use "-R" , not -R Commented Jun 9, 2019 at 21:58
  • @jsotola are you serious? to the op: use grep -e -R ./-file1 file2, where -R is a pattern starting with -, and ./-file1 is a filename starting with -. Commented Jun 9, 2019 at 21:59
  • 4
    The answer is here: What does “--” (double-dash) mean? (also known as “bare double dash”) Commented Jun 9, 2019 at 22:01
  • Thank you, @Freddy and pizdelect, both of your answers work for me! Commented Jun 9, 2019 at 22:13