title: osx - sudo with password execute
body: <p>Was trying to figure out how to execute a sudo command with the password as a parameter.</p>
  
  <pre><code>echo mypassword | sudo -S command
  </code></pre>
  
  <p>was using this reference <a href="https://stackoverflow.com/questions/11955298/use-sudo-with-password-as-parameter">Use sudo with password as parameter</a> </p>
  
  <p>However, on OS X it keeps say "sudo: incorrect password attempt" however that passwords is correct.</p>
  
  <p>what am i doing wrong?</p>