3 个版本
0.1.3 | 2023 年 1 月 5 日 |
---|---|
0.1.1 | 2023 年 1 月 4 日 |
0.1.0 | 2023 年 1 月 4 日 |
4 在 #ignore-case
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!