On Wed, 2004-08-18 at 16:26, Bob Parkinson wrote:
> I've started to use the "here document" idea a lot when writing scripts to do tasks.
> 
> #!/usr/local/bin/bash
> 
> psql -d myDB <<EOSQL
> 
> select foo ....
> update bar;
> delete from ...
> 
> EOSQL

If the here document is long and complicated, you should make that
command line

  psql -d myDB -f - <<EOSQL

so as to get the line number of any error (counting from the start of
the here document).



---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to