Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cannon07/minigrep
A fast, cross-platform command-line tool inspired by grep. Efficiently search for strings in files, delivering speed and reliability for file manipulation tasks.
https://github.com/cannon07/minigrep
grep rust
Last synced: about 1 month ago
JSON representation
A fast, cross-platform command-line tool inspired by grep. Efficiently search for strings in files, delivering speed and reliability for file manipulation tasks.
- Host: GitHub
- URL: https://github.com/cannon07/minigrep
- Owner: Cannon07
- Created: 2023-11-16T10:07:04.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-16T14:05:55.000Z (about 1 year ago)
- Last Synced: 2024-10-14T20:49:34.657Z (3 months ago)
- Topics: grep, rust
- Language: Rust
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MiniGrep: A Command Line Search Tool
MiniGrep is a command line search tool inspired by the classic `grep` command, designed and implemented in Rust. This tool allows users to search for specific strings within files, making it efficient, fast, and cross-platform.
## Features
- **Efficient Search**: Quickly locate strings within files.
- **Cross-Platform**: Works seamlessly on various operating systems.
- **Single Binary Output**: A standalone executable for easy deployment and use.## Getting Started
### Installation
To use MiniGrep, you need to have Rust installed. If you haven't installed Rust yet, you can get it from [Rust's official website](https://www.rust-lang.org/tools/install).
Once Rust is installed, you can build the project using Cargo, Rust's package manager:
```bash
git clone https://github.com/Cannon07/minigrep.git
cd minigrep
cargo build
```This will create the executable file `minigrep` in the `target/release/` directory.
### Usage
The basic usage of MiniGrep is as follows:
```bash
cargo run --
```Replace `` with the path to the file you want to search within and `` with the string you want to find.
For example:
```bash
cargo run -- "search this string" path/to/file.txt
```This will search `file.txt` for occurrences of `"search this string"` and print the matching lines.
## Contributions
Contributions are welcome! If you find any issues or want to enhance MiniGrep, feel free to open an issue or submit a pull request.