- 论坛徽章:
- 0
|
下面的代码可以正常运行:
#/usr/bin/sh
sqlplus -S etltest/etltest@basdw1 << !
set pagesize 0 feedback off verify off heading off echo off
col name noprint
col age noprint
column name new_val name_new
column age new_val age_new
select name,age from zyp_test;
host echo &name_new
host echo &age_new
exit
exit
!
可下面的代码却不行,各位老大帮忙看看为啥?
#/usr/bin/sh
aa=''
bb=''
sqlplus -S etltest/etltest@basdw1 << !
set pagesize 0 feedback off verify off heading off echo off
col name noprint
col age noprint
column name new_val name_new
column age new_val age_new
select name,age from zyp_test;
host aa=&name_new
exit
host bb=&age_new
exit
!
echo $aa
echo $bb
这样并 |
|