Crates.io | rusty-grep |
lib.rs | rusty-grep |
version | 0.1.1 |
source | src |
created_at | 2023-06-27 07:06:44.543622 |
updated_at | 2023-07-12 08:53:24.9157 |
description | RustyGrep is a command-line tool written in Rust that allows users to search for patterns in files |
homepage | |
repository | https://github.com/sunray-ley/rusty-grep |
max_upload_size | |
id | 901029 |
size | 7,593 |
RustyGrep is a command-line tool written in Rust that allows users to search for patterns in files. It is a modern implementation of the classic grep
command found on Unix systems.
RustyGrep offers the following features:
Search for patterns in one or multiple files
Search recursively through directories and subdirectories
Case-sensitive or case-insensitive searching
Display line numbers for matching lines
Display context around matching lines
Support for regular expressions
Fast and efficient searching, thanks to Rust's performance and memory safety guarantees
To use RustyGrep, you must have Rust installed on your system. You can download Rust from the official website: https://www.rust-lang.org/tools/install.
Once Rust is installed, you can install RustyGrep using Cargo, Rust's package manager:
cargo install rusty-grep
NOTICE: RustyGrep is still under active development and will soon be available.
The basic syntax for RustyGrep is:
rusty-grep [options] pattern [file ...]
Here are some examples:
Search for the word "hello" in a single file:
rusty-grep hello file.txt
Search for the word "world" in all .txt
files in the current directory, displaying line numbers for matching lines:
rusty-grep -n world *.txt
Search for the word "foo" in all .rs
files in the src
directory and its subdirectories, displaying two lines of context around each matching line:
rusty-grep -C 2 foo src/**/*.rs
For more information about RustyGrep's options and usage, please refer to the built-in help:
rusty-grep --help
Contributions to RustyGrep are welcome! If you have any suggestions or questions, please open an issue or pull request on GitHub.
RustyGrep is distributed under the MIT License. Please refer to the LICENSE file for more information.