/minigrep

A custom mini grep CLI made in Rust

Primary LanguageRust

minigrep

A simple grep-like CLI built in Rust, just for fun.

Run Locally

Clone the project

  git clone https://github.com/bryan-matheus/minigrep.git

Go to the project directory

  cd minigrep

Install dependencies

  cargo build

Start the app

  cargo run <term> <file>

Environment Variables

If you want to run a case insensitive search you will need this environment variable:

CASE_SENSITIVE = true

Usage / Examples

Test with the current test file under the root of the app.

  cargo run frog poem.txt

For case insensitive search we need to export environment variable

  export CASE_SENSITIVE=true

Then:

  cargo run frog poem.txt

And don't forget to unset the environment variable after use

  unset CASE_SENSITIVE

Tech Stack

Rust!