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.
bash
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
IGNORE_CASE=1 cargo run query filepath
Powershell: \
Env:IGNORE_CASE=1; cargo run query filepath.txt
To save search result to a file \
cargo run query search_filepath.txt > output_filepath.txt