How, if possible, can an .sql file be executed against an oracle database from a bash script
In a shell script:

#!/bin/bash

sqlplus user/pass@server/DATABASE&lt;&lt;THEEND

-- Change "1" to the desired fatal return code

whenever sqlerror exit 1;

@yoursqlscript.sql

quit;

THEEND


Or you can just run:

sqlplus user/pass@server/DATABASE @yoursqlscript


... and put the whenever sqlerror exit 1; at the top of your .sql script(s).