laoyutong / mini-grep

A command line gadget by rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mini-grep

A command line gadget by rust

Examples 🌰

1. Normal use

Input:

cargo run cold rainy.txt

Output:

There are 2 matching results
The day is cold,and dark,and dreary; 
My life is cold and dark and dreary;

2. No result

Input:

cargo run apple rainy.txt

Output:

There is no matching results

3. Lack of parameters

Input:

cargo run

Output:

The arguments is not enough

4. Non-existent file

Input:

cargo run test test.txt

Output:

Application error: No such file or directory (os error 2)

About

A command line gadget by rust


Languages

Language:Rust 100.0%