This project is a simple implementation of the grep command in Rust. It allows you to search for a specific pattern in a file and print the lines that contain the pattern.
- make sure you have Rust installed on your machine. If you don't have it yet, you can install it from here.
- Use cargo to install:
cargo install grep-rust-simple- Run the program using:
grep-rust-simple -E "pattern" filename # replace "pattern" and "filename" with your desired values-
Make sure you have Rust installed on your machine. If you don't have it yet, you can install it from here.
-
Clone the repository:
git clone https://github.com/arjav0703/grep-rust.git- Navigate to the project directory:
cd grep-rust- To use the program, run the following command:
cargo run -- -E "pattern" filename- Prints lines that match the given pattern.
- Support advanced regex patterns like
\d,\w, etc.