Example 1
echo exit | sqlplus / as sysdba @/var/tmp/usera/foo.sh |egrep "COUNT|3|Elapsed:" >>/var/tmp/db_timing.out
Example 2
while :; do echo exit | sqlplus / as sysdba @/var/tmp/usera/foo.sh |egrep "COUNT|3|Elapsed:" >>/var/tmp/db_timing.out; sleep 2; done
Example 3
while :; do sqlplus eli/eli @/var/tmp/usera/foo.sh >>/var/tmp/db_timing.out ; sleep 2; done