You could pipe in the sql commands...
eg.
% echo "select * from users" | psql userdb
On Thu, 2003-02-13 at 15:15, Susan Hoddinott wrote:
> Following reading through all the documentation it is not clear to me
> how to run a script file containing a number of SQL commands.
> Presumably I do this through the psql interface but how do I tell it
> to run a script?