title: How do you execute SQL from within a bash script?
body: <p>I have some SQL scripts that I'm trying to automate. In the past I have used SQL*Plus, and called the sqlplus binary manually, from a bash script.</p>
  
  <p>However, I'm trying to figure out if there's a way to connect to the DB, and call the script from inside of the bash script... so that I can insert <code>date</code> and make the queries run relative to a certain number of days in the past.</p>