Find a file
2025-04-02 22:36:05 +02:00
src wrapping up 2025-04-02 22:36:05 +02:00
.gitignore boilerplate code 2025-04-01 21:16:11 +02:00
Cargo.lock wrapping up 2025-04-02 22:36:05 +02:00
Cargo.toml wrapping up 2025-04-02 22:36:05 +02:00
README.md generated README.md 2025-04-02 07:39:29 +02:00

grrs - A Rust CLI Search Tool

This is a learning project based on the Command Line Applications in Rust 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

# Build the project
cargo build

# Run the project (replace PATTERN and PATH with your values)
cargo run -- PATTERN PATH

Using podman or docker

# 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