#!/bin/bash export PGPASSWORD=$4 host=$1 port=$2 username=$3 dbname=$5 table=$6 filename=$7 psql -h ${host} -p ${port} -U ${username} -d ${dbname} -c "\\copy ${table} from ${filename} with csv;"