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: Post, Ethan <Ethan.Post_at_ps.net>
Date: Wed, 8 Jun 2005 08:23:34 -0500
Message-ID: <E5D2567DDF0D03428A15664A78CA473C9EF693@pscdalpexch02.perotsystems.net>


There is also another handy command, can't recall it write off hand, maybe "script" which sends everything on the terminal to a log file.=20

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Nuno Souto Sent: Tuesday, June 07, 2005 7:31 AM
Cc: oracle-l_at_freelists.org
Subject: Re: Spool To More than 1 File

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:

>=20

> cat <file_name> |tee out 1>out2

>=20
> 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]$

--=20
Cheers
Nuno Souto
in sunny Sydney, Australia
dbvision_at_iinet.net.au

--
http://www.freelists.org/webpage/oracle-l


--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jun 08 2005 - 09:28:43 CDT

Original text of this message

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