Class03 Answer:

Write shell script which calls psql and connects to user named madlib.

I wrote this:

PGPASSWORD=madlib /usr/bin/psql -U madlib -d madlib -h -P pager=no $@

A feature of the above script is that it passes the password to psql.

Class03 Lab About Blog Contact Class01 Class02 Class03 Class04 Class05 Class06 Class07 Class08 Class09 Class10 dan101 Forum Google Hangout Vboxen