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