I'm simply trying to get the output from a sql statement and store in bash variable. I am getting " unexpected EOF while looking for matching `)' " error. I don't see what i'm doing wrong. Why am I getting this error?
var=$($ORACLE_HOME/bin/sqlplus / as sysdba <<EOF
select status from v\$instance;
exit;
EOF
)
version 3.1.17(1)-release, as well as on 4.3.