./sshi.sh vb20deployment controller <<'HERE' export PGPASSWORD="postgres" cd logu/postgresql/bin row=1 tableArray=(table1 table2 table3 table4 table5 table6)
for (( x=0 ; x<=5 ; x++)) ; do
./psql.bin --port=5432 --username=postgres --host=hostname.rds.amazonaws.com --dbname=mydb -c "SELECT * FROM information_schema.tables WHERE '${tableArray[$x]}' = table_name" | while read -a Record ; do row=$((row + 1)) if [[ $row -gt 3 ]]; then
./sshi.sh vb20deployment controller <<'HERE' export PGPASSWORD="postgres" cd logu/postgresql/bin row=1 tableArray=(table1 table2 table3 table4 table5 table6) for (( x=0 ; x<=5 ; x++)) ; do ./psql.bin --port=5432 --username=postgres --host=hostname.rds.amazonaws.com --dbname=mydb -c "SELECT * FROM information_schema.tables WHERE '${tableArray[$x]}' = table_name" | while read -a Record ; do row=$((row + 1)) if [[ $row -gt 3 ]]; then echo ${Record[4]} fi done done HERE
fi done
done
HERE