title: Parse ifconfig to get only my IP address using Bash
body: <p>I want to edit the bashrc file to have a simple function called "myip" to run. As you might guess, the function myip prints only my internal IP address of my machine.</p>
  
  <p>The far as I got working, this is the script:</p>
  
  <pre><code>ifconfig en1 | awk '{ print $2}' | sort
  </code></pre>
  
  <p>Which got my this output:</p>
  
  <pre><code>10.0.0.12
  options=1&lt;PERFORMNUD&gt;
  flags=8863&lt;UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST&gt;
  fe80::daa2:5eff:fe96:ba2f%en1
  d8:a2:5e:96:ba:2f
  autoselect
  active
  </code></pre>
  
  <p>I'm working on Mac&nbsp;OS&nbsp;X.</p>
  
  <p>How can I get this done?</p>