xgrepx 0.1.0

xgrep is a rust implementation of grep. This is a follow up from the rust book
Documentation
  • Coverage
  • 77.78%
    7 out of 9 items documented0 out of 5 items with examples
  • Size
  • Source code size: 11 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.32 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • xpanvictor

XGREP

Description

Xgrep is an implementation of the famous GREP in rust. GREP which means Globally search a Regular Expression and Print is used to search the contents of a file for a regular expression. This project was built as a step for mastering the RUST programming book. A bigger version has been built by a fellow Rustacean by the name Andrew Gallant in his project called RipGrep.

Usage

git clone git@github.com:xpanvictor/xgrep.git
cd xgrep
cargo run query filepath.txt

Where
query: a string to search for in
filepath: a path leading to file to search for

Options

  1. To ignore the search case:
  • Linux:
    IGNORE_CASE=1 cargo run query filepath
  • Powershell:
    Env:IGNORE_CASE=1; cargo run query filepath.txt
  1. To save search result to a file
    cargo run query search_filepath.txt > output_filepath.txt

Pending Updates

  1. Make xgrep display line number with the line of search results, issue here.

Contribution guidelines

  1. Welcome to xgrep. The project is just a learning tool but anyone is free to contribute.
  2. You can contribute via:
  1. Rust joy is needed :).