Grep –i Stand for case insensitive. With grep –i you can extract lines that correspond to your search criteria no matter the cases.
Let suppose a file name “name” that contain the name of many people.
Here is what it contain:
If you do :
cat name | grep –i moore
you will get :
Like you can see , your searching for moore with the 'm' in lowercase and you still get the line that contain moore with the 'M' in uppercase or else like you known linux is case sensitive and if you omit the -i option it will return no line like the following :
Or you can do :
grep –i moore name
And still get the same result!
Please feel free to leave comments, suggestion or to share this post!