[CentOS] Postgresql and shell script
tronnw at gmail.com
Tue Oct 30 11:05:27 UTC 2007
I have a shell script (sh) where I create a user and import data to a
su -c "createuser -A -D -P $PG_user" postgres
su -c "psql -d$PG_database -h localhost -U$PG_user -W -f postgresql.sql "
when the script executes those command, it ask for a password, how could I
do this without have to enter the passwd, I would like that it reads the
password from a variabel, that excists in a separate file, like
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the CentOS