How To Create Dynamic SQL Script from Bash
1sqlplus splex/$Splex_PW > $Action_File << EOF
2set HEADING OFF
3set ECHO OFF
4set FEEDBACK OFF
5set pages 0
6set lines 200
7select 'alter trigger '||owner||'.'||trigger_name||' $action; from dba_triggers where trigger_name like '%SPX%';
8select 'alter table '||table_owner||'.'||table_name||' modify t_updated_by_spx date default sysdate;' from dba_triggers where trigger_name like '%SPX%' ;
9@Action_File
10exit
11EOF
12
13rm $Action_File