Warning
This project has moved to: https://github.com/DafexDV/rust-linux-utils
This repository is archieved and no loger maintained.
This is my attempt to recreate the Linux's command "grep" in Rust.
- Clone the repository
git clone https://github.com/DafexDV/rgrep.git cd rgrep cargo install --path .
- Compile the project with cargo
cargo build
- Run the cli
cargo run -- <your args here>
Syntax:
rgrep [OPTIONS] <FILE> <PATTERN>Example:
rgrep test.txt helloArguments:
| # | Name | Description |
|---|---|---|
| 1 | <FILE> |
The file in which the pattern will be searched |
| 2 | <PATTERN> |
Search ignoring uppercase and lowercase |
Options:
| Name | Description |
|---|---|
-i |
Search ignoring uppercase and lowercase |
-v |
Show lines that do not match |
-c |
Instead of showing the lines, it just tells you how many matches were found |
-w |
Only matches the exact word, not if it is part of a larger |
-h, --help |
Print help |
-V, --version |
Print version |
- clap: Command line argument parser