minigrep_pbegle

Crates.iominigrep_pbegle
lib.rsminigrep_pbegle
version0.1.0
sourcesrc
created_at2021-07-22 09:00:35.506873
updated_at2021-07-22 09:00:35.506873
descriptionRust implementation of the grep CLI tool.
homepage
repository
max_upload_size
id425827
size4,931
Peter Begle (pbegle)

documentation

README

Minigrep: a simple, Rust implementation of the grep CLI tool

Installation

Ensure Rust is installed.

Clone the repo:

git clone https://github.com/pbegle/minigrep.git

cd into the cloned directory and run:

cargo install --path .

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:

minigrep "some text to search" some-file.txt

By default, the search text will be case sensitive. To enable case insensitive search, set the CASE_INSENSITIVE environment variable. Example:

CASE_INSENSITIVE=1 minigrep "TO" poem.txt
Commit count: 0

cargo fmt