- Read Tutorial
- Watch Guide Video
In the last guide, we talked about how we could implement universal search by leveraging the grep command in the Unix terminal. But now what happens if I were to do something like this, where I'm searching for Nav, but Nav has a capital letter?
If I quit out of this and run grep, and then search for nav, asterisk asterisk, slash asterisk dot erb, you can see that this doesn't actually pull up the file.
So that is a little bit of an issue because that's gonna lead to some kinda confusing results. So the way to fix this is, grep actually takes an optional flag of dash i, so if run dash i right here, hit return, you can see that now that pulls it up.
What dash i stands for is case insensitive search, or insensitive search, which means that nav is gonna work for capitals, lowercase, it's gonna completely ignore the type of case that it's in and it's simply gonna return anything that matches the nav regular expression.