Are you using SQL Plus ? If so, then you can use spool and append,
SQL> help spool
SPOOL
-----
Stores query results in a file, or optionally sends the file to a printer.
SPO[OL] [file_name[.ext] [CRE[ATE] | REP[LACE] | APP[END]] | OFF | OUT]
So your shell script can write the start time to a file, then your query can do "spool append" to the same file, and then your shell script can append the end time to the file.
eg
echo `date` > /tmp/myfile.dat
sqlplus @my_query.sql
echo `date` >> /tmp/myfile.dat
where "myquery.sql" would contain:
spool /tmp/myfile.dat append
Is that what you are after ?