Every grep command returns "grep: invalid option -- '='" [closed]

In case this isn't yet fixed, see if there is any file in the directory that starts with a '-'.

Reference

Helped me.


Sounds like you have an alias to grep, which is adding invalid arguments. Try the following:

type grep

this will tell you if the grep command is an alias or not. If it is, check your .profile, .bash_profile and .bashrc files for where this alias is defined.


I think you need to use:

grep -e "="