# 🕵️♂️ minigrep
**minigrep** is a simple command-line tool written in **Rust** that lets you search for substrings in a file — inspired by the classic `grep`.
## 📦 Features
- 🔍 Search for any substring in a file
- ⚡ Fast and lightweight (thanks to Rust!)
- 📁 Read from files passed via command line
- 🧵 Case-insensitive search (via env var)
cargo run -- body poem.txt > output.txt This will print all lines in poem.txt that contain the word "body".
To enable case-insensitive search, set the environment variable:
IGNORE_CASE=1 cargo run -- BODY poem.txt > output.txt - Make sure you have Rust installed.
- Clone the repo:
git clone https://github.com/piyush-itis/minigrep.git
cd minigrep
cargo build --release- Run it:
cargo run -- "your-query" "your-file.txt"This project is inspired by The Rust Programming Language Book, specifically the minigrep mini-project.
MIT
PRs welcome! Feel free to fork, enhance, and contribute.