ip2cidr

Small and simple program for converting a netmask into a CIDR
git clone https://noxz.tech/git/ip2cidr.git
Log | Files | README | LICENSE

README
1ip2cidr
2======
3`ip2cidr` is a small and simple program for converting an ip address (mask)
4into a CIDR, or returning an already valid CIDR.
5
6Installation
7------------
8Edit config.mk to match your local setup (ip2cidr is installed into the
9/usr/local namespace by default), then simply enter the following command to
10install (if necessary as root):
11
12    make clean install
13
14Example usage of ip2cidr
15------------------------
16Allow user to enter a subnet mask as either a CIDR or as an ip address:
17
18    read -p "enter subnet mask: " output; output=$(ip2cidr "$output")
19