A command-line tool that searches for text patterns in files.
Reaper is a command-line tool that searches for specific text patterns in files, similar to the classic Unix grep
utility. This implementation is written in Rust for performance, safety, and ease of use.
- Fast text searching in files
- Case-sensitive searching (default)
- Case-insensitive searching with a flag
- Clear and helpful output formatting
-
Pre-requisites:
Cargo, Rust v1.82+
-
Build the project with:
git clone https://github.com/bakayu/reaper.git
cd reaper
cargo build --release
- The compiled binary will be available at
target/release/reaper
.
Use the utility with the following commands: (make sure to add the path of the binary to your environment)
reaper [OPTIONS] <PATTERN> <FILE>
Options
-i, --ignore-case
: Perform case-insensitive matching.
- Search for "text" in a file:
repear text somefile.txt
- Search for "rust" case-insensitively:
reaper -i rust somefile.txt
or
reaper --ignore-case rust somefile.txt
To run tests, run the following command:
cargo test