title: Bash Shell script to calculate an address in a subnet
body: <p>This is a difficult one to extrapolate what I need, so bear with me. Let's say we have this subnet 10.4.x.0/28 which iterates itself across multiple subnets that look the same, i.e</p>
  
  <pre><code>10.4.0.0/28
  10.4.0.16/28
  10.4.0.32/28  etc...
  </code></pre>
  
  <p>and we have a single address in these subnets that we need to extract that will always be +12 of the current subnet.  i.e   </p>
  
  <pre><code>10.4.0.0/28  -&gt;  10.4.0.12
  10.4.0.16/28  -&gt; 10.4.0.28
  10.4.0.32/28  -&gt;  10.4.0.44
  </code></pre>
  
  <p>How would I go about writing a shell script to loop through all of the subnets from </p>
  
  <p><code>10.4.0.0/28</code>  to <code>10.4.255.240</code> to get the single address in each subnet?</p>