Skip to content

Grep written in go that can be run in parallel

Notifications You must be signed in to change notification settings

madiganz/gogrep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gogrep

File searcher that has a sequential or parallel processing option. Optimized for large files.

Get source code and dependecies

go get -u github.com/madiganz/gogrep

Build on Windows

  • for Windows: go build
  • cross combine for Linux (CS1) using git bash: $ env GOOS=linux GOARCH=386 go build

Run on Windows

./gogrep.exe [-flags] pattern filename

Run on Linux

./gogrep [-flags] pattern filename (may need to run chmod +x gogrep)

Flags

  • -cs - Perform case-sensitive search. Default is false.
  • -p - Number of parallel workers to use. Default is 4. Specify 1 for sequential processing.
  • -v - Output all lines that match the search pattern

Testing

Build and Run

On Windows

From inside ./gogrep/ - go build -o filegenerator.exe .\filegenerator

To run - ./filegenerator.exe

On Linux

Follow similar pattern as for ./gogrep

This will create multiple files in a ./test directory that can be used to test the performance of the file searcher.

About

Grep written in go that can be run in parallel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages