| Crates.io | butterkups-minigrep |
| lib.rs | butterkups-minigrep |
| version | 0.1.1 |
| created_at | 2025-02-26 15:57:50.386742+00 |
| updated_at | 2025-02-26 16:28:36.690621+00 |
| description | Mini grep utility; very weak application, use grep instead. |
| homepage | https://github.com/butterkup/fe2o2/tree/master/misc/minigrep |
| repository | |
| max_upload_size | |
| id | 1570581 |
| size | 8,870 |
Simple, small grep like utility developed while learning rust. Brings with it a small poem for testing.
$ 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?