title: Check if database exists in PostgreSQL using shell
body: <p>I was wondering if anyone would be able to tell me about whether it is possible to use shell to check if a PostgreSQL database exists?</p>
  
  <p>I am making a shell script and I only want it to create the database if it doesn't already exist but up to now haven't been able to see how to implement it.</p>