spool file creating
646508May 18 2009 — edited May 18 2009hi i am running a unix loop and in that creating a sql statement. now i want to spool the result to a file . but the problem is the spool file should have time as the name. loop runs after every 2 mins.
while [ true ];
do
sudo su - BATPBL<<!
sqlplus hr/hr<<!
spool /ankur/ank_XXXX #XXXX should be the time
select * from guard_usr order by guard_usr_id;
spool off
!
sleep 9
done
Please help