title: how to create AppleScript app to run a set of terminal commands
body: <p>How would I go about creating an AppleScript command that when I just run the script (or double click it in Finder?), it would run a set of terminal commands? The set of commands completely remove MySQL, and it has become a pain to constantly write them out. The commands are:</p>
  
  <pre><code>sudo rm /usr/local/mysql
  sudo rm -rf /usr/local/mysql*
  sudo rm -rf /Library/StartupItems/MySQLCOM
  sudo rm -rf /Library/PreferencePanes/My*
  sudo rm -rf /Library/Receipts/mysql*
  sudo rm -rf /Library/Receipts/MySQL*
  sudo rm /etc/my.cnf
  </code></pre>
  
  <p>There is also another command <code>sudo nano /etc/hostconfig</code> that opens a file and I need to delete a line from the file, but that seems like it'd be too hard to code, so I guess I can do that by hand. But it would be a huge help to do this automatically with a single script. </p>
  
  <p>Would it just be a bunch of these commands?</p>
  
  <pre><code>do shell script (...)
  </code></pre>
  
  <p>Thanks,
  Hristo</p>