| Crates.io | graby |
| lib.rs | graby |
| version | 1.0.0 |
| created_at | 2023-08-01 12:00:45.121751+00 |
| updated_at | 2023-09-08 11:33:08.720178+00 |
| description | Search and print matching patterns in given file. |
| homepage | https://github.com/Raghav-Bell/graby |
| repository | https://github.com/Raghav-Bell/graby |
| max_upload_size | |
| id | 931824 |
| size | 27,612 |
This is a small implementation of grep command line tool in rust (see References).
From version 1.0.0 onwards regular expressions or regex is also supported.
For complete implementation of grep in rust, check ripgrep.
For running or installing graby, install rust.
To add graby run the following cargo command in your project directory:
cargo add graby
or manually add following in Cargo.toml file.
graby = "1.0.0" # graby = "version"
To build graby from source you need to install rust on your device and run the following commands:
git clone https://github.com/Raghav-Bell/graby.git
cd graby
cargo run -- --help
or you can also build it from released binaries.
For searching QUERY pattern in FILE_PATH use following command:
graby --q QUERY --f FILE_PATH
For more options run
graby --help
Usage: graby.exe [OPTIONS] --query <QUERY> --file-path <FILE_PATH>
Options:
-q, --query <QUERY> Pattern to search in the file
-r, --regex-match Take pattern as regular expression
-f, --file-path <FILE_PATH> Path to the file
-i, --ignore-case Ignore case distinctions while searching QUERY in FILE_PATH
-v, --invert-match Print the lines without QUERY pattern in the FILE_PATH
-h, --help Print help
-V, --version Print version
or check documentation.
It is licensed under MIT.
All small or large contributions are welcomed .