It is true that a bash script cannot connect to the database, but it can run SQLPLUS. I am no Unix master, but I will give it a go on linux and see what we get.
t.sh:
CODE
sqlplus system@test/password @dd.sql
then you have to change the t.sh file so it can be executed:
QUOTE
$ chmod 777 t.sh
Then create the dd.sql file:
CODE
spool results.txt
select 'SUCCESS' from dual;
spool off
exit
Now run it:
QUOTE
$ ./t.sh
now check the spooled results:
QUOTE
$ more results.txt
'SUCCES
-------
SUCCESS
Hey it works!
Edward