grepcidr
« Back to VersTracker
Description:
Filter IP addresses matching IPv4 CIDR/network specification
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Networking
Tags: networking cli filter ipv4 sysadmin
Install: brew install grepcidr
About:
Grepcidr is a command-line utility designed to filter lines of text based on whether they contain IP addresses falling within a specified IPv4 CIDR block or network range. It parses input streams to identify IP addresses and matches them against the given network criteria, outputting only the matching lines. This tool is particularly useful for processing large log files or data streams where IP-based filtering is required.
Key Features:
  • Filters text streams for IPv4 addresses within CIDR ranges
  • Supports standard CIDR notation (e.g., 192.168.1.0/24)
  • Efficiently processes large files like logs
  • Works as a standard Unix filter (stdin/stdout)
Use Cases:
  • Filtering web server logs to isolate traffic from specific subnets
  • Extracting relevant IP entries from network device outputs
  • Pre-processing data for security analysis based on IP ranges
Alternatives:
  • awk/sed – More complex to implement CIDR matching logic manually; grepcidr provides a specialized, simple interface.
Version History
Detected Version Rev Change Commit
Sep 11, 2025 5:39am 0 VERSION_BUMP ba73162e