Skip to content
This repository was archived by the owner on Sep 8, 2026. It is now read-only.

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust "Grep" Command

Warning

This project has moved to: https://github.com/DafexDV/rust-linux-utils

This repository is archieved and no loger maintained.

Rust License

This is my attempt to recreate the Linux's command "grep" in Rust.

Installation

  1. Clone the repository
    git clone https://github.com/DafexDV/rgrep.git
    cd rgrep
    cargo install --path .
  2. Compile the project with cargo
    cargo build
  3. Run the cli
    cargo run -- <your args here>
    

Use

Syntax:

rgrep [OPTIONS] <FILE> <PATTERN>

Example:

rgrep test.txt hello

Arguments:

# 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

Special thanks

  • clap: Command line argument parser

About

My attempt to recreate the Linux's command "grep" in Rust.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages