#grep #poem #txt #tiny #ignore-case #command-line-tool #search

bin+lib minigrepf

一个小型 grep 克隆,用于搜索单个文件,具有忽略大小写的环境变量选项

3 个版本

0.1.3 2023 年 1 月 5 日
0.1.1 2023 年 1 月 4 日
0.1.0 2023 年 1 月 4 日

4#ignore-case

MIT 许可证

6KB
92

minigrepf

这是来自《Rust 编程语言》一书的第 12 章的简单 minigrepf 命令行工具。

用法

$ ls
poem.txt minigrepf

$ cat 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!

$ ./minigrepf to poem.txt
Are you nobody, too?
How dreary to be somebody!

$ IGNORE_CASE=1 ./minigrepf to poem.txt
Are you nobody, too?
How dreary to be somebody!
To tell your name the livelong day
To an admiring bog!

lib.rs:

minigrepf

minigrepf 是从《Rust 编程语言》第 12 章练习构建的一个小型命令行工具。

用法

$ ls
poem.txt minigrepf

$ cat 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!

$ ./minigrepf to poem.txt
Are you nobody, too?
How dreary to be somebody!

$ IGNORE_CASE=1 ./minigrepf to poem.txt
Are you nobody, too?
How dreary to be somebody!
To tell your name the livelong day
To an admiring bog!

无运行时依赖