mapcidr
mapcidr copied to clipboard
[Feature] Add CIDR to Range as option
It would be nice if there was an option to take a CIDR and get a simple range.
For example: echo "192.168.0.0/16" | mapcidr -range would return 192.168.0.0-192.168.255.255
It would be nice if there was an option to take a CIDR and get a simple range. For example:
echo "192.168.0.0/16" | mapcidr -rangewould return192.168.0.0-192.168.255.255
you may use ipcalc for such a task:
ipcalc 192.168.0.0 - 192.168.255.255
192.168.0.0/16
ipcalc 192.168.0.0/16 | grep -e ^Address: -e ^Broadcast: | awk '{printf $2" - "}' | cut -d "-" -f 1,2
192.168.0.0 - 192.168.255.255