I am using the variables inside shell script. Not a scripting guy, trying to make things work.
My command:
Connection variables
VSQLPATH=/opt/vertica/bin/vsql
TECHNOLOGY=vertica
HOST=xxxxxx.com
PORT=5433
DB_NAME=glider
USERNAME=cuser
if [ "${TECHNOLOGY}" = "vertica" ]
then
export PASSWORD="${PWD}"
${VSQLPATH} --host="${HOST}" --port="${PORT}" --username="${USERNAME}" --dbname="${DB_NAME}" -w "${PWD}" |tee -a ${log_file}
fi
I should get connected output in log file and it has to disconnect to complete the script. Right now its showing "connecting to the database" and hangs in there forever. Need help.