Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 854 Bytes

README.md

File metadata and controls

42 lines (30 loc) · 854 Bytes

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