Crates.io | minigrep_macano953 |
lib.rs | minigrep_macano953 |
version | 0.1.1 |
source | src |
created_at | 2022-01-25 14:20:34.695254 |
updated_at | 2022-01-25 14:28:31.481584 |
description | A fun grep tool written as my first incursion into Rust. Not intended to be inherited and used in production code |
homepage | |
repository | |
max_upload_size | |
id | 520818 |
size | 5,375 |
Ensure Rust is installed.
Clone the repo:
git clone https://github.com/macano953/minigrep_macano953
cd
into the cloned directory and run:
cargo install --path .
NOTE: This will install the binary in $HOME/.cargo/bin
by default
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