WHENEVER SQLERROR EXIT SQL.SQLCODE
WHENEVER OSERROR EXIT

SET LONG 2000000
SET PAGESIZE 0
SET LINES 32767
SET TRIMSPOOL ON
SET VERIFY OFF
SET ECHO OFF

column txt format a350 word_wrapped
exec dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'EMIT_SCHEMA', false);

spool "&2"
SELECT 
    REGEXP_REPLACE(
            REGEXP_REPLACE(
            DBMS_METADATA.get_ddl('TABLE', '&1'),
            ' COLLATE "[^"]+"',          -- strip column collation
            ''
            ),
            ' DEFAULT COLLATION [^ ]+',    -- strip table default collation
            ''
        ) txt
FROM dual;
spool off

quit;
/