title: Change host file with script on Mac
body: <p>I'm trying to append a line to the hosts file on a mac.
  The command I'm using is:</p>
  
  <pre><code>sudo echo "192.168.99.100 test" &gt;&gt; /private/etc/hosts
  </code></pre>
  
  <p>This method does work on windows &amp; linux but on Mac I do not have the permissions to run this even when running it in <code>sudo</code> mode.</p>
  
  <p>Can anybody tell me what I'm doing wrong and how I can fix this?</p>
  
  <p>StefanJanssen</p>