Grep clone using Golang
In the root of the project run the command go install ./...
Then use the program like mentioned below.
The clone supports the flags
-
-i
for case-insensitive search.- USAGE:
gogrep -i pattern destination
.
- USAGE:
-
-c
for the number of matches within the destination.- USAGE:
gogrep -c pattern destination
.
- USAGE:
-
-A [n]
for 'n' number of lines after a match.- USAGE:
gogrep -A 3 pattern destination
.
- USAGE:
-
-B [n]
for 'n' number of matches before a match.- USAGE:
gogrep -B 3 pattern destination
.
- USAGE: