Skip to content
Ahmatjan edited this page May 8, 2023 · 1 revision

Welcome to the mgrep wiki!

minigrep for search contents in file

A simple command line tool for searching for a string in a file

inspired by rust book and rust course

Usage

for development and testing usage

$ cargo run -- [OPTIONS] <search> <file>

for release and installed usage

$ mgrep [OPTIONS] <search> <file>

Options

  • -i : ignore case distinctions
  • -c : print word count in file (exclude dots and commas)
  • -h : print help message

Examples

$ mgrep "hello world" README.md
$ mgrep -i "hello world" README.md
$ mgrep -c  README.md
Clone this wiki locally