Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minigrep

A simple command-line tool written in Rust for searching for a query string in a file. Inspired by the classic grep utility, minigrep is a lightweight alternative for basic search needs.

Features

  • Search for a string in a text file
  • Case-sensitive and case-insensitive search modes
  • Simple and easy-to-understand codebase

Usage

cargo run -- <QUERY> <FILENAME>
  • <QUERY>: The string to search for.
  • <FILENAME>: The path to the file to search in.

Example:

cargo run -- to poem.txt

To run in case-insensitive mode, set the CASE_INSENSITIVE environment variable:

CASE_INSENSITIVE=1 cargo run -- to poem.txt

Building

To build the project, ensure you have Rust installed, then run:

cargo build

Running Tests

You can run the tests using:

cargo test

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages