I am trying to do a recursive search in a directory, looking for instances where the following sequence of characters occur in my code files:
-=
I am using the following command at the CLI:
grep -rn -= --include=*.hpp .
I get the following error message:
grep: invalid option -- '='
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
Unfortunately, the help dosen’t help much in addressing my question (or at least, I can’t see how it addresses my problem).
Try:
The issue is that
-=is interpreted as a command-line option. Use--to signify end of command-line options, so the-=is interpreted as a pattern instead.