generated README.md
This commit is contained in:
parent
baf6df0fe7
commit
cfc7b1266a
1 changed files with 38 additions and 0 deletions
38
README.md
Normal file
38
README.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# grrs - A Rust CLI Search Tool
|
||||
|
||||
This is a learning project based on the [Command Line Applications in Rust](https://rust-cli.github.io/book/tutorial/) tutorial. The project implements a simple grep-like command-line tool that searches for a pattern in a file.
|
||||
|
||||
## Project Overview
|
||||
|
||||
`grrs` (pronounced "grass") is a simple CLI tool that:
|
||||
- Takes a pattern and a file path as command-line arguments
|
||||
- Searches for the pattern in the specified file
|
||||
- Prints each line that contains the pattern
|
||||
|
||||
This project demonstrates:
|
||||
- Command-line argument parsing with `clap`
|
||||
- File I/O operations in Rust
|
||||
- Error handling with the `Result` type
|
||||
- Structuring a Rust CLI application
|
||||
|
||||
## Building and Running
|
||||
|
||||
### Using Cargo
|
||||
|
||||
```bash
|
||||
# Build the project
|
||||
cargo build
|
||||
|
||||
# Run the project (replace PATTERN and PATH with your values)
|
||||
cargo run -- PATTERN PATH
|
||||
```
|
||||
|
||||
### Using podman or docker
|
||||
|
||||
```bash
|
||||
# Build the project
|
||||
podman run -v$PWD:/app:z -w/app --rm rust cargo build
|
||||
|
||||
# Run the project (replace PATTERN and PATH with your values)
|
||||
podman run -v$PWD:/app:z -w/app --rm rust cargo run -- PATTERN PATH
|
||||
```
|
Loading…
Add table
Reference in a new issue