请在下面找到代码。我无法理解出了什么问题以及在哪里。
date1='20120101'
echo ${date1}
date_with_slash=`nawk -v var=${date1} 'BEGIN {print substr(var,7,2)}'`/`nawk -v var=${date1} 'BEGIN {print substr(var,5,2)}'`/`nawk -v var=${date1} 'BEGIN {print substr(var,1,4)}'`
echo ${date_with_slash}
Value_Range='VALLLLLUUUUEEE'
echo $Value_Range
Value_Range = `sqlplus -s lode/lode@oropl_gw <<EOF
set serveroutput on
declare
Value_Range varchar2(20):='val';
ddate varchar2(20):=${date_with_slash};
begin
select to_char(sysdate + 2 - (select trunc(sysdate)- to_date('${date_with_slash}','dd/mm/yyyy') from dual),'yyyymmdd') into Value_Range from dual;
dbms_output.put_line(Value_Range);
end;
/
exit
EOF`
echo date1 is ${date1}
echo value is ${Value_Range}