set feedback off
set verify off
set pause off
set termout off
set heading off

define CHECKROLE=&&1

select 'exit ' || decode(count(*), 0, 1, 0) from dba_roles where role='&&CHECKROLE'

spool tmproleexists.sql
/
spool off

set termout on
start tmproleexists.sql