Skip to content

ajuijas/grep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grep in Go

A simple grep implementation in Go. Inspired by Go Bootcamp here https://one2n.io/go-bootcamp/go-projects/grep-in-go

Build

To build the application, run the following command:

go build -o grep main.go

Usage

Search within a single file

grep <pattern> <file_path>

Example:

grep "error" logs.txt

Search within all files in a directory (including subdirectories)

grep <pattern> <directory_path>

Example:

grep "error" ./logs

Assumptions

  1. If a directory is provided as input, all files within its subdirectories are also considered.
  2. All files in the given directory are assumed to be text files.

About

A simple grep implementation in Go. Inspired by Go Bootcamp here https://one2n.io/go-bootcamp/go-projects/grep-in-go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages