Datapump export exclude internal users with $ in schema name
Hi,
I am trying to run a datapump export and dynamically create the schemas list by setting a system variable I can call into the expdp command. Things work except for excluding the schemas with a $ in them.
I set my system variable with:
SCHEMAS=`sqlplus -s / <<EOF
set echo off;
set head off;
set feedback off;
set verify off;
set trimspool on;
set trimout on;
set lines 32000
select listagg(username,',') within group (order by username)
from dba_users
where username not in ('ANONYMOUS','APEX_PUBLIC_USER','APPQOSSYS','AUDSYS','CTXSYS','DBSNMP','DIP',
'EXFSYS','EXP','FLOWS_030000','FLOWS_FILES','GSMADMIN_INTERNAL','GSMCATUSER','GSMUSER','MDDATA',