Crates.io | grrs_hj |
lib.rs | grrs_hj |
version | 0.1.1 |
source | src |
created_at | 2023-01-29 22:09:39.708406 |
updated_at | 2023-01-30 14:05:35.930297 |
description | A tool to search files |
homepage | https://github.com/JuliaJHL/week2-rust-mini-proj.git |
repository | https://github.com/JuliaJHL/week2-rust-mini-proj.git |
max_upload_size | |
id | 771249 |
size | 34,049 |
$ cat test.txt
apple 1
bee 2
cat 3
dog 4
apple 5
$ grrs_hj apple test.txt
apple 1
apple 5
git clone https://github.com/JuliaJHL/week2-rust-mini-proj.git
cd week2-rust-mini-proj
cargo build --release
cargo run -- xxx(pattern) xxx(path)
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
I made package info updates in Cargo.toml
and pushlished it via:
cargo login
cargo publish
Therefore, you can install grrs_hj
and run it without cloning the repo by implementing the following commands directly:
cargo install grrs_hj
grrs_hj xxx(pattern) xxx(path)
Here is an example: