Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Spool To More than 1 File

Re: Spool To More than 1 File

From: Nuno Souto <dbvision_at_iinet.net.au>
Date: Tue, 07 Jun 2005 22:31:05 +1000
Message-ID: <42A59389.9070106@iinet.net.au>


Eric Buddelmeijer apparently said,on my timestamp of 7/06/2005 5:29 AM:
> If you are using some sort of *nix, I just succeeded in getting two files on
> cygwin using tee:
>
> cat <file_name> |tee out 1>out2
>
> tee writes to the standard output (aka device 1) and to a file, in this case
> out. Redirect 1 to another file and you have split it all. I bet you can
> 'nest' it further using pipe and tee again. As long as you can spawn
> processes.

Akshally, the correct way to use "tee" in *n*x would be as follows:

[nsouto_at_db2 sql]$ sqlplus 2>&1 |tee zot.log

SQL*Plus: Release 9.2.0.6.0 - Production on Tue Jun 7 05:28:04 2005

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Enter user-name: system
Enter password:

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production JServer Release 9.2.0.6.0 - Production

SQL> select * from dual;
Press Return to continue...

D
-
X

1 row selected.

Elapsed: 00:00:01.15
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production JServer Release 9.2.0.6.0 - Production
[nsouto_at_db2 sql]$ cat zot.log

SQL*Plus: Release 9.2.0.6.0 - Production on Tue Jun 7 05:28:04 2005

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Enter user-name: Enter password:

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production JServer Release 9.2.0.6.0 - Production

SQL> Press Return to continue...
D
-
X

1 row selected.

Elapsed: 00:00:01.15
SQL> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production JServer Release 9.2.0.6.0 - Production
[nsouto_at_db2 sql]$

-- 
Cheers
Nuno Souto
in sunny Sydney, Australia
dbvision_at_iinet.net.au
--
http://www.freelists.org/webpage/oracle-l
Received on Tue Jun 07 2005 - 08:36:03 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US