我需要根据提供电子邮件地址的 SQL 输出设置 BASH 变量。作为我所做的测试:
email=$(echo "SELECT email FROM adr" | sqlplus $user/$pass@$db)
一个echo $email
节目:
SQL*Plus: Release 8.1.7.0.0 - Production on Fri Oct 25 10:45:06 2013 (c) Copyright 2000 Oracle Corporation. All rights reserved. Connected to: Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production JServer Release 8.1.7.4.0 - Production SQL> 2 Disconnected from Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production JServer Release 8.1.7.4.0 - Production
所以我想我需要一些修整才能获得电子邮件地址?
SELECT
如下手册显示了完整的输出:
SQL> SELECT email FROM adr;
EMAIL
--------------------------------------------------------------------------------
user@mail.com
获取电子邮件地址的最简单方法是什么?