.一般变量的写法: if (str_kind is not null) then l_str_kind := str_kind; v_wheresql := v_wheresql || ' and kind = :kind '; else l_str_kind :'; v_wheresql := v_wheresql || ' and 1 = :kind '; end if; .时间段的写法: if (dt_itstarttime is not null) then v_wheresql :=
一.expect脚本中,变量的不同写法 shell脚本中定义时间变量的写法:time=`date "+%Y%m%d"` ==>>直接照搬到expect中,设置的变量是不生效的:set time `date "+%Y%m%d"`这样的写法是错误的,无法识别. ==>>应该这样写:set time [exec date +%Y%m%d]才是正确的写法. 二.shell脚本和expect脚本的结合 将expect加入到shell脚本后 set 定义