Grep -i command in Linux

Can anyone give practical example of grep -i command in Linux? grep man page said:

Ignore case distinctions, so that characters that differ only in case match each other.
What does it mean? Where can I use it?

To find a word named “foo” in filename, you run

grep "foo" filename

But, what if you need to match uppercase word such as FOO and lowercase such as FOO (fOO, Foo, FoO and so on)? Try passing the -i option:

grep -i foo filename

grep -i command example

Find vivek, VIVEK in /etc/passwd

grep -i vivek /etc/passwd

Match init() or Init() in source.c:

grep -i 'init()' source.c

See my page

Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki