Minigrep: a simple, Rust implementation of the grep
CLI tool
Installation
Ensure Rust is installed.
Clone the repo:
cd
into the cloned directory and run:
NOTE: This will install the binary in $HOME/.cargo/bin
by default
Usage
minigrep
takes two arguments: a query (the text to search) and the filename in which to look for the query. If the file contains the query provided, minigrep will print out the entire matching line.
Example:
By default, the search text will be case sensitive. To enable case insensitive search, set the CASE_INSENSITIVE
environment variable. Example:
CASE_INSENSITIVE=1