title: How to silently install dmg file in mac os x system (using shell script)?
body: <p>I have used the following command for dmg file attach and detech</p>
  
  <pre><code>hdiutil attach installer.dmg 
  hdiutil detach installer.dmg 
  </code></pre>
  
  <p>in the dmg file it contains test.app 
  GUI mode installation, i can drag the test.app to application location</p>
  
  <p>What i need is when i double-click the script, dmg containing the app should install automatically to </p>
  
  <p>application location in mac os x after that terminal window should automatically closed</p>
  
  <p>Thanks in advance for your answers</p>