title: need to break IP address stored in bash variable into octets
body: <p>i've got a bash variable that contains an IP address (no CIDR or anything, just the four octets).</p>
  
  <p>i need to break that variable into four separate octets like this:</p>
  
  <pre><code>$ip = 1.2.3.4; 
  $ip1 = 1
  $ip2 = 2
  # etc
  </code></pre>
  
  <p>so i can escape the period in sed. is there a better way to do this? is awk what i'm looking for?</p>