https://github.com/kylesmith19091/grep_implementation
Naive implementation of grep tool using the Boyer Moore String matching algorithm
https://github.com/kylesmith19091/grep_implementation
boyer-moore-algorithm cli grep-like
Last synced: 3 months ago
JSON representation
Naive implementation of grep tool using the Boyer Moore String matching algorithm
- Host: GitHub
- URL: https://github.com/kylesmith19091/grep_implementation
- Owner: KyleSmith19091
- Created: 2021-08-10T08:05:53.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-12T11:35:20.000Z (almost 4 years ago)
- Last Synced: 2025-02-02T03:41:28.946Z (5 months ago)
- Topics: boyer-moore-algorithm, cli, grep-like
- Language: C++
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GREP Implementation
This is a naive implementation of the GNU grep tool, it follows the same algorithm for the string matching which is the **Boyer Moore**
string matching algorithm. This is implmented using c++11.## How to Use?
### Installation
#### 1. First clone the repo
```shell
$ git clone https://github.com/sKorpion19091/GREP_Implementation.git
```#### 2. Build it from source.
This project needs to be built from source. So make sure you have the *make* command available.
```shell
$ make
```This will then build a binary inside the build directory.
#### 3. Usage
So we can run the program as follows:```shell
$ ./build/main pattern "this is a pattern matching string"
```The output will look something like this:
```shell
$ this is a "pattern" matching string
```
**Note this will only work if ANSI colors are supported on your terminal.