Skip to content

devwraithe/ferris-find

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ferris Find

Ferris Find is a simple command-line tool for searching text in files, built with Rust. It's an implementation of the minigrep project from the official Rust book, demonstrating core Rust concepts in a practical application.

About

This project showcases fundamental Rust programming concepts:

  • Command-line argument parsing
  • File I/O operations
  • Error handling
  • Environment variables
  • String searching and filtering

Usage

Basic Search

Search for a query string in a file and print matching lines to the console:

cargo run -- to poem.txt

Output to File

Search for a query string and redirect the results to an output file:

cargo run -- to poem.txt > output.txt

Command Format

cargo run -- <query> <filename>
  • <query>: The text string to search for
  • <filename>: The file to search within

Getting Started

Prerequisites

  • Rust (latest stable version recommended)
  • Cargo

Installation

  1. Clone the repository:
git clone https://github.com/devwraithe/ferris-find.git
cd ferris-find
  1. Build the project:
cargo build
  1. Run the tool:
cargo run -- <query> <filename>

Example

Given a poem.txt file with the following content:

I'm nobody! Who are you?
Are you nobody, too?
Then there's a pair of us - don't tell!

Running:

cargo run -- you poem.txt

Will output:

I'm nobody! Who are you?
Are you nobody, too?

About

Ferris Find is a lightweight Rust-powered CLI tool that searches files for matching text with speed, clarity, and zero fuss.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages