Like ...
su - user -c "myscript.sh"
And in myscript.sh you'd have something like (perhaps) ...
...
sqlplus /as sysdba @myscript.sql
...
And lastly, in myscript.sql you'd have (or similar) ...
select name from v$database ;
Anyways, hope that helps some
Cheers,
Cameron