Giter VIP home page Giter VIP logo

grape's Introduction

Grape

CircleCI

Multithreaded Alternative to grep

grep which is the most popular tool used to make regex searches on Linux systems, has been around for a while. The current implementation of grep is single-threaded and does not make use of modern multi-core systems. This is specially evident when the search is spread over a large number of files and directories. Thus, we plan to implement an improved version of grep which makes use of modern concurrency and parallelism.

Instructions to install

clone the repository:

git clone "https://github.com/IITH-SBJoshi/concurrency-7.git"

create directory for build

  cd Grape 
  mkdir build && cd build

build the project

  cmake .. && make 

sudo required to execute from any position.

  sudo cp ./grape /bin/

Usage

grape [OPTION]... PATTERN [FILE]
Search for PATTERN in each FILE.
Example: grape -i 'hello world' main.c

Pattern selection and interpretation:
 -F,   --fixed-string         {default}PATTERN is a normal string
 -G,   --basic-regexp         PATTERN is a basic regular expression (default)
 -e,   --regexp=PATTERN       use PATTERN for matching
 -i,   --ignore-case          ignore case distinctions

Miscellaneous:
       --version              display version information and exit
       --help                 display this help text and exit
       --usage                display usage text and exit

Output control:
 -n,   --line-number          print line number with output lines
 -r,   --recursive            recursive search inside directory
 -L,   --files-without-match  print only names of FILEs with no selected lines
 -l,   --files-with-matches   print only names of FILEs with selected lines


note:-  gtest is required for normal cmake install .
  if you don't want to install gtest then remove CmakeList.txt 
  and rename _CMakeLists.txt as CMakeLists.txt .

grape's People

Contributors

dhananjayraut avatar jatin-code777 avatar megatron10 avatar raja29naik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.