psql and passwd - Mailing list pgsql-jdbc

From Alex Dovlecel
Subject psql and passwd
Date
Msg-id E18E7aY-0003yK-00@ford.kbs.twi.tudelft.nl
Whole thread Raw
Responses Re: psql and passwd  (Dave Cramer <Dave@micro-automation.net>)
List pgsql-jdbc
Hello all
I create a bash file that
1)drops the database
2)create the database again
3)call the psql on initdb.sql file (wich creates the tables and stuff)
4)call the psql on populatedb.sql file

It works fine... but there is something that I don't like
Step 1) ask me the account passwd
Step 2) ask me the account passwd
Step 3) ask me the account passwd
Step 4) ask me the account passwd

So I have to type the passwd 4 times... for each command!!!

Is there any way around this: to send the password from command line as a
parameter?

I am using bash so there might be someone who can tell me if I can use some
pipe mechanisms to achieve this ?

Tx
dovle

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: default values
Next
From: Dave Cramer
Date:
Subject: Re: psql and passwd