ignoring multiple patterns

Hi,

Using grep how to ignore multiple patterns

for example

# multiple
#installOption
#role
role
#ROLE

I want to ignore all that comes with # in a single command

If I use

grep -v \^\#"role" <filename>

The #role gets ingored but not #ROLE.

I want to ignore #installOption # multiple etc

Thanks a lot

$ grep -v "^#" input.txt
role

Aside from the obvious correctness of balajesuri's solution you should probably know about alternates in regex, or at least searching for this discussion's heading should yeild information on alternates, (even if it's only what they are called in order to google them :wink: ).

With extended grep (egrep or grep -E ) you can use an alternate to search for either of 2 things.

grep -Ev  '^#(Role|role|multiple|installOption)' $FILE_NAME