把shell参数传递给sqlplus如下:
[lcecs@BJ-ECS-XHM-3F02-LCHT-06 ftpphone]$ step_one=`sqlplus -S UCRXX/fXXXX@ECXX<
> set heading off
> set feedback off
> set pagesize 0
> set verify off
> set echo off
> select a.state from TS_D_RPT_ACCOUNTS_RESULT a where a.Accounts_Date='201708' and a.proc_type = '02';
> exit
> EOF`
[lcecs@BJ-ECS-XHM-3F02-LCHT-06 ftpphone]$ echo $step_one
0
[lcecs@BJ-ECS-XHM-3F02-LCHT-06 ftpphone]$ Accounts_Date=201708
[lcecs@BJ-ECS-XHM-3F02-LCHT-06 ftpphone]$ step_one=`sqlplus -S UCRXX/fXXXX@ECXX<
> set heading off
> set feedback off
> set pagesize 0
> set verify off
> set echo off
> select a.state from TS_D_RPT_ACCOUNTS_RESULT a where a.Accounts_Date=$Accounts_Date and a.proc_type = '02';
> exit
> EOF`
[lcecs@BJ-ECS-XHM-3F02-LCHT-06 ftpphone]$ echo $step_one
0
阅读(1695) | 评论(0) | 转发(0) |