Class03 Answer:

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

I wrote this:


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

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


Class03 Lab


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