bgrep
brew install bgrep
v0.3
BSD-2-Clause
Like grep but for binary strings
40
30-day installs · #5149
52
90-day · #7235
131
365-day · #8465
420
★ GitHub stars · updated 2mo ago
Links
- https://github.com/tmbinc/bgrep
- GitHub: tmbinc/bgrep
- Brew formula source: Formula/b/bgrep.rb
Raw metadata
{
"aliases": [],
"alternatives": [],
"build_dependencies": [],
"categories": [],
"caveats": null,
"conflicts_with": [],
"dependencies": [],
"deprecated": 0,
"deprecation_reason": null,
"desc": "Like grep but for binary strings",
"disable_reason": null,
"disabled": 0,
"enrichment_fetched_at": "2026-06-20T23:35:50+00:00",
"first_seen": "2026-06-20T23:34:18+00:00",
"full_name": "bgrep",
"github_default_branch": "main",
"github_last_commit_at": "2026-06-09T22:54:24Z",
"github_readme_excerpt": "# bgrep\n\nI\u0027m terribly annoyed by the fact that grep(1) cannot look for binary\nstrings. I\u0027m even more annoyed by the fact that a simple search for\n\"binary grep\" doesn\u0027t yield a tool which could do that. So I wrote one.\n\nFeel free to modify, branch, fork, improve.\n\n## Building\n\n```sh\nmake\n```\n\n## Installing\n\n```sh\nmake install # to /user/local/bin, or\nmake install PREFIX=~/.local\n```\n\nOr, if you need it quickly,\n\n```sh\ncurl -L \u0027https://github.com/tmbinc/bgrep/raw/main/bgrep.c\u0027 | gcc -O2 -x c -o $HOME/.local/bin/bgrep -\n```\n\n## Usage\n\n```\nbgrep [-r] [-B bytes] [-A bytes] [-C bytes] \u003chex\u003e [\u003cpath\u003e [...]]\nbgrep [-r] -f \u003cpattern\u003e [-m \u003cmask\u003e] [\u003cpath\u003e [...]]\n```\n\n| Option | Description |\n| ------------ | -------------------------------------------------------- |\n| `-B \u003cbytes\u003e` | print `\u003cbytes\u003e` of context before each match |\n| `-A \u003cbytes\u003e` | print `\u003cbytes\u003e` of context after each match |\n| `-C \u003cbytes\u003e` | print `\u003cbytes\u003e` of context before **and** after a match |\n| `-r` | recurse into directories |\n| `-f \u003cfile\u003e` | read the search pattern from a file instead of `\u003chex\u003e` |\n| `-m \u003cfile\u003e` | read a mask file (wildcard bytes for the pattern) |\n\nWhen no path is given, `bgrep` reads from standard input.\n\n### Examples\n\nSearch a file for the byte sequence `0x42 0x42 0x42`:\n\n```sh\nbgrep 424242 firmware.bin\n```\n\nRecurse through a directory:\n\n```sh\nbgrep -r 424242 ./images\n```\n\n## License\n\nBSD 2-Clause. See [LICENSE](LICENSE).\n",
"github_repo": "tmbinc/bgrep",
"github_stars": 420,
"github_topics": [],
"homepage": "https://github.com/tmbinc/bgrep",
"homepage_og_description": null,
"homepage_og_image": null,
"homepage_title": null,
"installs_30d": 40,
"installs_365d": 131,
"installs_90d": 52,
"keg_only": 0,
"keg_only_reason": null,
"last_seen": "2026-06-20T23:34:18+00:00",
"license": "BSD-2-Clause",
"llm_generated_at": null,
"llm_model": null,
"name": "bgrep",
"oldnames": [],
"one_liner": null,
"optional_dependencies": [],
"rank_30d": 5149,
"rank_365d": 8465,
"rank_90d": 7235,
"raw_hash": "091e18bd2f4e48d1",
"recommended_dependencies": [],
"revision": 0,
"ruby_source_path": "Formula/b/bgrep.rb",
"tap": "homebrew/core",
"test_dependencies": [],
"uses_from_macos": [],
"version_head": "HEAD",
"version_stable": "0.3",
"versioned_formulae": [],
"why_use_this": null
}