cli_grrs_rust_sample

Crates.iocli_grrs_rust_sample
lib.rscli_grrs_rust_sample
version0.1.0
created_at2025-05-03 16:45:23.107362+00
updated_at2025-05-03 16:45:23.107362+00
descriptionA tool to search files
homepagehttps://github.com/lumosityfan/cli_grrs_rust_sample
repositoryhttps://github.com/lumosityfan/cli_grrs_rust_sample
max_upload_size
id1658983
size22,605
Jeff Xie (lumosityfan)

documentation

README

** About this project **

This project comes from the Command Line Tutorial for Rust and is named cli_grrs_rust_sample. The tool is used to parse through files and figure out if a certain pattern exists in that file, then prints out the lines where the pattern is located, if at all. The tool contains error handling for if a file doesn't exist or the buffer is overloaded and contains tests for empty strings, if the file doesn't exist, and testing if the file content is properly printed out. Future tests will include seeing what happens if a pattern doesn't exist in a file.

** How to Use **

The program takes in 2 arguments - the pattern and the file. You use it with cargo run with -- and the 2 arguments as follows:

cargo run -- <PATTERN> <PATH>

PATTERN represents the pattern you wish to look for in the file. PATH represents the path of the file you wish to look for the pattern within.

Commit count: 3

cargo fmt