Reputation: 10083
How can I search for file containinng the character string --->
?
$ cat arrow
--->
$ grep ---> *
-bash: *: ambiguous redirect
$ grep "--->" *
grep: unrecognized option '--->'
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help` for more information.
$ grep "\-\-\-\>" *
$
Upvotes: 0
Views: 215
Reputation: 827
Use grep -- to signal end of options
grep -- '--->' *
Upvotes: 4