pipe-out-from-a-sequence-of-commands to sqlplus

tengrid發表於2009-05-18

C:\Documents and Settings\xxx>(
More? echo select sysdate from dual
More? echo /
More? echo exit
More? )|sqlplus

SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 2月 5 15:02:51 2007

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


連線到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL>   2
SYSDATE
--------------
05-2月 -07

SQL>

 

-------------------*inux------------------------
alias sqlplus
alias sqlplus='uniread /opt/oracle/product/10.2/db_1/bin/sqlplus'
sqlplus                   
xxx> (
> echo select sysdate from dual
> echo /
> echo exit
> )|sqlplus boss/boss

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Feb 5 15:08:14 2007

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL>   2 
SYSDATE
------------
05-FEB-07

SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
xxx>

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/94384/viewspace-600287/,如需轉載,請註明出處,否則將追究法律責任。