Skip to content

subhojit777/minigrep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minigrep

Requirements

Rust-lang should be installed in your system.

Installation

git clone https://github.com/subhojit777/minigrep.git
cd minigrep
cargo build --release

Usage

./target/release/minigrep -<options> nemo find-nemo-the-movie.txt

Example - ./target/release/minigrep -i nemo find-nemo-the-movie.txt

Allowed Options

i - Case-insensitive.
w - Exact match.

Documentation

cargo doc --no-deps --open

Run tests

cargo test

Note

This is not a drop in replacement for the good old grep-like commands. This is written for the sake of learning Rust-lang.

Motivation behind open sourcing

Actually this is an excersice in the book. I have open sourced this because I have followed a different implementation than what is suggested in the book. TDD followed while writing the helper libraries.

What is differently done in minigrep?

  • Case-insensitive search can be done by passing an option.
  • Ability to do exact-match search.
  • The query is highlighted in the output.

Feedbacks are welcome :)

About

A small version of grep command written in Rust

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages