Re: [GENERAL] Combine psql command with shell script

2009-03-11 Thread Alvaro Herrera
John Wang wrote: > > How to combine psql commands, such as "\copy", with shell script? Is > there any sample code? For example, I have 10 tables and want to user > the "\copy" command to import data from 10 different text files. I can > execute the "\copy" command 10 times. But it is not convenien

Re: [GENERAL] Combine psql command with shell script

2009-03-10 Thread A. Kretschmer
In response to John Wang : > > How to combine psql commands, such as "\copy", with shell script? Is there > any sample code? For example, I have 10 tables and want to user the "\copy" > command to import data from 10 different text files. I can execute the > "\copy" command 10 times. But it is

Re: [GENERAL] Combine psql command with shell script

2009-03-10 Thread John R Pierce
John Wang wrote: How to combine psql commands, such as "\copy", with shell script? Is there any sample code? For example, I have 10 tables and want to user the "\copy" command to import data from 10 different text files. I can execute the "\copy" command 10 times. But it is not convenient.

[GENERAL] Combine psql command with shell script

2009-03-10 Thread John Wang
How to combine psql commands, such as "\copy", with shell script? Is there any sample code? For example, I have 10 tables and want to user the "\copy" command to import data from 10 different text files. I can execute the "\copy" command 10 times. But it is not convenient. Thanks. --