I am curious about the comment "you can't use variable here" If it refers to not being able to use the spool cmd with a substitution variable, it is incorrect. Here is a bit from a script: col crole noprint new_value urole prompt Duplicate which role? : set term off feed off select lower('&&1') crole from dual; set term on define dup_file=_&&urole._grant.sql set echo off term on feed off set trimspool on set verify off pages 0 line 200 spool &&dup_file Jared On 6/8/05, Oracle <all_about_oracle@xxxxxxxxxx> wrote: > > You got the answer? > > Here is what I going to do > > > Spool /tmp/hardcoded_file.txt #you can't use variable here > select sysdate from dual; > spool off > host /usr/bin/cp /tmp/hardcoded_file.txt /tmp/hardcoded_file2.txt > > > > ----- Original Message ----- > From: "Post, Ethan" <Ethan.Post@xxxxxx> > To: <oracle-l@xxxxxxxxxxxxx> > Sent: Tuesday, June 07, 2005 12:46 AM > Subject: Spool To More than 1 File > > > > One thing I would like to see is the ability to spool output from > > SQL*Plus to more than one file at a time. I am writing a script in which > > I am spooling the results of each command to "foo" and then grepping the > > foo file for the elapsed time and putting it in a log file using "!grep > > ...". The problem with this method is that I can't spool the results of > > the entire script to another file in the event I want to see the detail. > > I could use some "cat" commands to keep moving the results but this > > seems like a pretty easy and perhaps usefull feature. > > -- > > //www.freelists.org/webpage/oracle-l > > > > > -- > //www.freelists.org/webpage/oracle-l > -- Jared Still Certifiable Oracle DBA and Part Time Perl Evangelist -- //www.freelists.org/webpage/oracle-l