| Crates.io | grrs-lazy |
| lib.rs | grrs-lazy |
| version | 0.2.0 |
| created_at | 2019-01-06 12:15:27.188661+00 |
| updated_at | 2019-01-06 12:35:49.354336+00 |
| description | A tool to search files |
| homepage | https://github.com/crodjer/grrs/ |
| repository | https://github.com/crodjer/grrs/ |
| max_upload_size | |
| id | 105831 |
| size | 5,883 |
A simple search utility, based on the rust cli-wg tutorial:
https://rust-lang-nursery.github.io/cli-wg/tutorial/
It has a few differences from the final grrs built in the tutorial:
find_matches in src/lib.rs.std::io::BufReader instead of std::fs::read_to_string,
so that we avoid loading all the content from a file in memory.find_matches, so that the processing is
done in a lazy stream.To install, run:
cargo install grrs-lazy
You can then search for lines in a text file:
$ grrs-lazy Sherlock path/to/the-adventures-of-sherlock-holmes.txt | wc -c
6089