[GENERAL] psql copy from through bash

2013-01-11 Thread Kirk Wythers
Can anyone see what I'm misisng? I am trying to run a psql copy from command through a bash script to load a buch of cdv files into the same table. I'm getting an error about the file infile not existing? #!/bin/sh for infile in /path_to_files/*.csv do cat infile | psql dbname -c \copy

Re: [GENERAL] psql copy from through bash

2013-01-11 Thread Szymon Guz
On 11 January 2013 19:13, Kirk Wythers kwyth...@umn.edu wrote: Can anyone see what I'm misisng? I am trying to run a psql copy from command through a bash script to load a buch of cdv files into the same table. I'm getting an error about the file infile not existing? #!/bin/sh for infile

Re: [GENERAL] psql copy from through bash

2013-01-11 Thread Szymon Guz
On 11 January 2013 19:32, Kirk Wythers wythe...@umn.edu wrote: On Jan 11, 2013, at 12:18 PM, Szymon Guz mabew...@gmail.com wrote: On 11 January 2013 19:13, Kirk Wythers kwyth...@umn.edu wrote: Can anyone see what I'm misisng? I am trying to run a psql copy from command through a bash

Re: [GENERAL] psql copy from through bash

2013-01-11 Thread Pavel Stehule
Hello Once more quickie. It seems that I am going to be asked for my password every time psql loops through the copy statement. What is considered best practices to handle authentication? I am connecting locally, as myself as the user and I'm being asked for my user password. I added the

Re: [GENERAL] psql copy from through bash

2013-01-11 Thread Jerry Sievers
Kirk Wythers kwyth...@umn.edu writes: Can anyone see what I'm misisng? I am trying to run a psql copy from command through a bash script to load a buch of cdv files into the same table. I'm getting an error about the file infile not existing? #!/bin/sh for infile in /path_to_files/*.csv

Re: [GENERAL] psql copy from through bash

2013-01-11 Thread Kirk Wythers
On Jan 11, 2013, at 12:18 PM, Szymon Guz mabew...@gmail.com wrote: On 11 January 2013 19:13, Kirk Wythers kwyth...@umn.edu wrote: Can anyone see what I'm misisng? I am trying to run a psql copy from command through a bash script to load a buch of cdv files into the same table. I'm

Re: [GENERAL] psql copy from through bash

2013-01-11 Thread Rob Sargentg
On 01/11/2013 11:32 AM, Kirk Wythers wrote: On Jan 11, 2013, at 12:18 PM, Szymon Guz mabew...@gmail.com mailto:mabew...@gmail.com wrote: On 11 January 2013 19:13, Kirk Wythers kwyth...@umn.edu mailto:kwyth...@umn.edu wrote: Can anyone see what I'm misisng? I am trying to run a