I assume this is a unix platform, I think the following is more what your looking for, create a unix file with execute permissions:

Code:
sqlplus -s scott/tiger <<-! > /home/xxx/update_xxx.log
  set serveroutput on
  set echo on 
  set time on
  set timing on

  select *
  from emp ;

  list;
  !
exit
Regards