for tbl in `cat A.txt`doecho " spool test.log; @B/$tbl.sql; commit; spool off;" | sqlplus user/password@DBdone