Skip to content

dmfv/grep-like-utility

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple grep-like utility

It is utility to play with multithreading. Tested on Linux (Ubuntu) and Windows.

Features

  • Written with using C++20 features (can be adapted to lower standards)
  • Multithreading support for faster searches
  • Command-line interface similar to the classic grep command
  • Testing with GTest
  • Build system using CMake

#Requirements

  • C++20 compatible compiler
  • CMake
  • GTest

For compilation use next:

mkdir build
cd build
cmake ..
cmake --build .

To run tests:

make tests

or

ctest

Or you could always run tests manually as executable file

Utility usage:

This utility super primitive and supports only one type of arguments

./MyGrep PATTERN PATH

You could compare results of this utility and regular grep/pgrep in test folder (tests/test_folder_2)

Classical grep unility equivalents:

This MyGrep arguments could be equivalent to this grep arguments: MyGrep works with all files by default (doesn't skip binaries or others files)

MyGrep 123 tests
grep -ra tests
MyGrep 123 tests/test_folder_1/100.txt
grep -raH tests/test_folder_1/100.txt

About

Simple grep-like utility

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published