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?
I am making a shell script and
psql -l|awk '{print $1}'|grep -w
shorter version