line 45: syntax error: unexpected end of file -
when try running script, gettin error line 45: syntax error: unexpected end of file. relatively new scripting. please me resolve it.
#!/bin/ksh set -xv export home=/home/mine . $home/.env.ksh bis_spool=/tmp/bis_table_mine.spl bis_report_mine=/tmp/bis_table_report_mine.txt touch $bis_spool rm $bis_spool touch $bis_spool exec 5< $bis_report_mine while read -u5 rec_mine tblename=`echo "$rec_mine" | awk '{print $3}' | tr '[:upper:]' '[:lower:]'` sqlplus -s ${user_id}/${user_pass}@${oracle_sid} <<- eof set feedback off set hea on set pagesize 9999 set linesize 9999 set trimspool on set termout off spool $bis_spool append column c1 heading 'job name' format a30 column c2 heading 'table name' format a30 select job_name c1, table_name c2, table_usage table_name 'tblename%' / exit; eof done exec 5<& -
the <<- eos
interpreted literally. make
sqlplus -s ${user_id}/${user_pass}@${oracle_sid} <<-eof
without space char.
also make sure there no space char before or after closing eos
, leading tab chars allowed.
ihth
Comments
Post a Comment