#mini-grep #grep #case-sensitive

bin+lib butterkups-minigrep

Mini grep utility; very weak application, use grep instead

1 unstable release

0.1.1 Feb 26, 2025
0.1.0 Feb 26, 2025

#1050 in Text processing

Download history 299/week @ 2025-02-26

299 downloads per month

MIT license

9KB
190 lines

Minigrep

Simple, small grep like utility developed while learning rust. Brings with it a small poem for testing.

Sample run on command line

$ cat <<EOF >poem.txt
I'm Nobody! Who are you?
Are you nobody, too?
Then there's a pair of us - don't tell!
They'd banish us, you know.

How dreary to be somebody!
How public, like a frog
To tell your name the livelong day
To an admiring bog!
EOF

# Case sensitive search
$ cargo run to poem.txt
poem.txt:2: Are you nobody, too?
poem.txt:6: How dreary to be somebody!

# Disable case sensitivity
$ MINIGREP_ICASE=true cargo run nobody poem.txt
poem.txt:1: I'm Nobody! Who are you?
poem.txt:2: Are you nobody, too?

lib.rs:

Minigrep

Small grep like utility that is fairly useless given the capabilities for grep, the real one.

No runtime deps