How to quote a SQL*Plus identifier in a bash script? I get &quot;ORA-00904: &quot;MEMORY_TARGET&quot;: invalid identifier&quot; no matter how I try to quote the identifier in the following command:
MEMORY_TARGET=$(su - orat01 -c &quot; echo 'select VALUE from V\$PARAMETER where name = 'memory_target';'| sqlplus / as sysdba &quot;)

Any ideas on how to do this would be greatly appreciated.
[root@o73 ~]# SGA_TARGET=$(su - oracle -c &quot;export ORACLE_SID=RYMIN19; export ORAENV_ASK=NO; . oraenv &gt;/dev/null; echo \&quot;set pages 0
select value from v\\\$parameter where name = 'sga_target';\&quot; | sqlplus -s / as sysdba&quot;)
[root@o73 ~]# echo $SGA_TARGET
2147483648
[root@o73 ~]#