A command line application in Rust
This is a tool where we can give a string and a path, and it will print only the lines containing the given string.
project setup
- Clone the repo:
git clone https://github.com/JuliaJHL/week2-rust-mini-proj.git
- cd into the repo:
cd week2-rust-mini-proj
- compile the project:
cargo build --release
- run the project:
cargo run --xxx(pattern) xxx(path)
examples:
I created a test.txt with the following contents:
apple 1
bee 2
cat 3
dog 4
apple 5
When we apply cargo run -- apple test.txt, it would only return:
apple 1
apple 5