I'm making an script in bash in what i run a psql query with this:
VAR="$(psql -h prov-db-cl -p 5446 -d prov -U prov -c "SELECT value FROM table where query = 'query'")"
The problem is the content on $VAR
is like this:
value ----------------- result (1 row)
I just need result
in my $VAR
to use it in the rest of the script.