RE: Spool To More than 1 File

  • From: "Post, Ethan" <Ethan.Post@xxxxxx>
  • To: <dbvision@xxxxxxxxxxxx>
  • Date: Wed, 8 Jun 2005 08:23:34 -0500

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@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Nuno Souto
Sent: Tuesday, June 07, 2005 7:31 AM
Cc: oracle-l@xxxxxxxxxxxxx
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@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@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@db2 sql]$


--=20
Cheers
Nuno Souto
in sunny Sydney, Australia
dbvision@xxxxxxxxxxxx
--
//www.freelists.org/webpage/oracle-l


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

Other related posts: