Skip to the content.

Grep Case Insensitive Search

By default grep is case sensitive. Which simply means “function” and “Function” are two distinct words for it, we can overcome this by passing -i argument to it.

Example

$ echo "Hey There" | grep -i "hey there"
Hey There

Here, even if we’re searching for lowered case “hey”, we still get “Hey There”.

Source: Linuxize