# rgon - A simple Rust-based grep clone `rgon` is a command-line tool written in Rust that searches for a query string within a file. ## Features - Search for a query string in a text file. - Case-insensitive search if the `IGNORE_CASE` environment variable is set. - Prints matching lines from the file. ## Installation To use `rgon`, you'll need to have Rust and Cargo installed. If you don't have them, you can install them from [https://rust-lang.org](https://rust-lang.org). To install and run `rgon`, clone the repository and build the project: ```bash git clone https://github.com/jmeq17/rgon.git cd rgon cargo build --release ``` ## Usage Once installed, you can use `rgon` by running the following command: ```bash cargo run -- [OPTIONS] ``` ### Example ```bash cargo run -- "to" "assets/tinyTale.txt" ``` This will search for the string `"to"` in the file `assets/tinyTale.txt` and print all matching lines. ### Case-Insensitive Search To perform a case-insensitive search, set the `IGNORE_CASE` environment variable: ```bash cargo run -- -i "To" "assets/tinyTale.txt" ``` This will match both `"To"` and `"to"` in the file. ## OPTIONS - `-i` or `--ignore-case`:ignore case sensitivity. ## Tests To run the tests: ```bash cargo test ``` This will run the unit tests for `search` and `search_case_insensitive` functions. ## License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.