ip2cidr

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

README.md (567B)


      1 ip2cidr
      2 ======
      3 `ip2cidr` is a small and simple program for converting an ip address (mask)
      4 into a CIDR, or returning an already valid CIDR.
      5 
      6 Installation
      7 ------------
      8 Edit 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
     10 install (if necessary as root):
     11 
     12     make clean install
     13 
     14 Example usage of ip2cidr
     15 ------------------------
     16 Allow 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