title: Mounting Encrypted DMG through terminal
body: <p>I have to write a python script that opens a series of encrypted DMGs on Mac and I was following this tutorial
   <a href="http://techanic.net/2012/10/14/programmatically_mounting_encrypted_disk_images_in_os_x.htm" rel="nofollow">Tutorial</a> </p>
  
  <p>The basic command that I am using is the following, I tried it on terminal directly.</p>
  
  <pre><code>echo "Password" | hdiutil attach /path/DMG.dmg
  </code></pre>
  
  <p>What happens is that it asks for the password and echo is not working. I need a way to do all in code.</p>