michael orlitzky


Get It

The development version can be found in the hath git repository. Official releases can be found on the hath hackage page.


Hath is a Haskell program for working with network blocks in CIDR notation. When dealing with blocks of network addresses, there are a few things that one usually wants to do with them:

Hath does just that. It takes as its input (via stdin) a list of CIDR blocks.


Hath has the following modes:


This computes a (Perl-compatible) regular expression matching the input CIDR blocks. It's the default mode of operation.

user $ echo "" | hath



This combines small blocks into larger ones where possible, and eliminates redundant blocks. The output should be equivalent to the input, though.

user $ echo "" | hath reduced


Shows only the blocks that would be removed by reduce; that is, it shows the ones that would get combined into larger blocks or are simply redundant.

user $ echo "" | hath duped


Shows what would change if you used reduce. Uses diff-like notation.

user $ echo "" | hath diffed





List the IP addresses contained within the given CIDRs.

user $ echo | hath listed

The command-line syntax and complete set of options are documented in the man page.


Email them to me at michael@orlitzky.com.