Implementation of a simple grep like the exercise of the Rust Book.
Please don't use it or use it at your risks. You can use ripgrep.
Requirements:
- Rust 2021
- Cargo 1.79.0
You can download the project and build it with Meson.
git clone https://github.com/Xyphenore/mini-grep.git
cargo build
To search a pattern in a file
cargo run -- Rust resources/example.txt
To ignore case sensitivity
Unix
IGNORE_CASE=1; cargo run -- Rust resources/example.txt
Windows (cmd)
set IGNORE_CASE=1 && cargo run -- Rust resources/example.txt
Windows (PowerShell)
$env:IGNORE_CASE = "1"; cargo run -- Rust resources/example.txt
cargo doc
Open the target/doc/mini_grep/index.html in the directory target/doc/web_server.
cd target/doc/web_server