Calculating netmask in bash
Masks were meant to be used for a reason and not to hide behind. (c) Anthony T. Hincks
A subnet mask is a set of bits that determines how many bits are used to specify the subnet address and how many are used to specify the computer address within that subnet. It’s more common to see a subnet mask in decimal notation, but it’s actually represented in binary. If you understand how a subnet address and a computer address within that subnet are represented, you can easily determine the subnet address and subnet mask from the computer address and subnet mask, as follows: <subnet-address>/<number-of-bits>
[Read More]