grab
grab is a grep-like command-line tool written in Go.
Installation
Go install
go install "github.com/aelberthcheong/grab@latest"
Build from source
git clone "https://github.com/albertcheong/grab.git"
cd grab
make build
The binary will be available at
bin/grab
Usage
From files
grab [options] <pattern> [file1 file2 ...]
cat dummy.txt | grab <pattern>
Exit Codes
| Exit Code |
Meaning |
| 0 |
Success; Success (at least one match found) |
| 1 |
No match; No matches found |
| 2 |
Error; such as invalid options or a non existing input file |
License
MIT License. See LICENSE for details.