macOS
brew install grepcidrlocal Homebrew formula metadata
sudo port install grepcidrMacPorts ports tree · sysutils/grepcidr/Portfile · source: api.github.com
brew
Filter IP addresses matching IPv4 CIDR/network specification. Version 2.0 via Homebrew; verified from local package data.
install
brew install grepcidrlocal Homebrew formula metadata
sudo port install grepcidrMacPorts ports tree · sysutils/grepcidr/Portfile · source: api.github.com
sudo apt install grepcidrDebian stable package indexes · grepcidr · source: deb.debian.org
sudo dnf install grepcidrFedora Rawhide package metadata · grepcidr · source: dl.fedoraproject.org
nix profile install nixpkgs#grepcidrnixpkgs package indexes · pkgs/by-name/gr/grepcidr/package.nix · source: api.github.com
sudo zypper install grepcidropenSUSE Tumbleweed package metadata · grepcidr · source: download.opensuse.org
overview
Filter IP addresses matching IPv4 CIDR/network specification
history
grepcidr is a small C command-line filter for matching IPv4 and IPv6 addresses against CIDR patterns. It borrows grep's interface style for a networking-specific job: select or reject log lines by address range.
Jem Berkes identifies the pc-tools.net grepcidr as the original project, created in 2004 and released as grepcidr 2.0 on 2014-05-26. The official page emphasizes that the 2.0 line is distinct from John Levine's separately developed fork, even though both names can confuse users.
Version 2.0 added IPv6 support, replaced a regex-based scanner with a hints scanner reported as faster on some platforms, enforced stricter IP text matching, added multiple file arguments, supported unlimited input line length, and improved CIDR validation.
grepcidr's niche is operational networking: mail filtering, network security, log analysis, and custom pipelines where a full IP-address database or firewall tool would be too heavy. Its adoption in package managers follows from being a single-purpose Unix filter with no documented configuration or credential state.
The official examples show grepcidr matching an IPv6 documentation prefix against a log file and matching a Googlebot-era IPv4 CIDR range against access.log. Options include count output, inverted matching, strict CIDR alignment, strict start-of-line matching, command-line patterns, and pattern files.
grepcidr is package-nerd significant because it is a tiny specialist filter that fills a gap between grep and heavier network-analysis tools. It lets shell users keep grep-like pipelines while making CIDR math correct enough for log and abuse workflows.
The official fork note matters for packaging: downstreams need to know whether they are shipping Berkes' grepcidr 2.0 line or Levine's unrelated implementation.
security posture
broad file, network, media, or database tool signal.
blue risk · medium confidence · tool
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
grepcidr | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://www.pc-tools.net/unix/grepcidr/
install metadata
| Package key | brew:grepcidr |
|---|---|
| Version | 2.0 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/grepcidr |
| Homepage | https://www.pc-tools.net/unix/grepcidr/ |
| Upstream docs | https://www.pc-tools.net/unix/grepcidr |
| License | GPL-2.0-or-later |
| Source archive | https://www.pc-tools.net/files/unix/grepcidr-2.0.tar.gz |
| Bottle | available (on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | grepcidr |
| Version Scheme | 0 |
| Revision | 0 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
grepcidr 2.0-2
Filter IP addresses matching IPv4/IPv6 CIDR/network specification
http://www.pc-tools.net/unix/grepcidr/
sudo apt install grepcidrgrepcidr
nix profile install nixpkgs#grepcidrgrepcidr 2.0-2
Filter IP addresses matching IPv4/IPv6 CIDR/network specification
http://www.pc-tools.net/unix/grepcidr/
sudo apt install grepcidrgrepcidr 2.0-12.fc44
Filter IPv4 and IPv6 addresses matching CIDR patterns
https://www.pc-tools.net/unix/grepcidr/
sudo dnf install grepcidrgrepcidr 2.0-2.6
Filter IP addresses matching IPv4/IPv6 CIDR specification
http://www.pc-tools.net/unix/grepcidr/
sudo zypper install grepcidrgrepcidr
sudo port install grepcidrsource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.