0
#!/bin/bash -x

x=`sqlplus scott/tiger@xe<<endl
set heading off
select sysdate from dual;
exit
endl`

echo the answer is $x

出力しています

the answer is SQL*Plus: Release 10.2.0.1.0 - Production on Wed Mar 27 09:01:25 2013 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production SQL> SQL> 27-MAR-13 SQL> Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Productiong 

私が欲しいのは、クエリ sysdate の結果だけです。オラクルのリリース、著作権などの情報をすべて削除するにはどうすればよいですか。

4

1 に答える 1

0

答えを見つけた

sqlplus -s

その後、ヘッダーを削除します

于 2013-03-27T16:21:20.620 に答える