在shell中执行sqlplus命令往往要相互传参数,请看下面代码 #!/bin/ksh #获取数据库参数表参数 proc_path=`sqlplus -silent "usename/password@consid" <<END set pagesize 0 feedback off verify off heading off echo off; select m_kind from table_name where tt<='$0'; exit; END` if [ -z "$proc_path" ]; then echo "empty" exit 0 else echo $proc_path fi