The original source for the tutorial can be found here
This version has an additional enhancement, it accepts an extra parameter to control wherever we ignore casing or not. Use it like this:
cargo run <search-query> <file> [I|K]
For example:
cargo run to poem.txt I
If the casing parameter is not present, mingrep
will search for an environment variable called CASE_INSENSITIVE
, the default behaviour is to keep the casing information on search.