Hi Everybody,
I am new to this group and also to the Unix shell scripting.
I need some one to throw some light on this issue. I am not sure whats wrong in this script.When I execute this korn shell script it gives me an error
0403-057 Syntax error at line 28 : `<' is not matched.
##############################Raj############################################
# Script to run the EDI_INBOUND PROGRAM #
# Reads the files that are in van_in folder #
# Dated : 05/02/2007 #
#############################################################################
#set -x
. $HOME/.profile
#############################################################################
CONTROLDIR=/u01/Raj
LOGDATE=`date +"%m%d%Y%H%M"`
LOGFILE=$CONTROLDIR/edi_$LOGDATE.log
INBOUND_DIR=/Raj/test/inbox
OUTBOUND_DIR=/Raj/test/inbox/archive
DBCONN=xxxx/xxxx@oracle
#############################################################################
cd $CONTROLDIR
#. ../env.init
cat /dev/null > $LOGFILE
cd $INBOUND_DIR
echo "=======================================================================" >>$LOGFILE
echo " EDI Process Log File Dated:`date +"%d/%h/%Y"` " >>$LOGFILE
echo "=======================================================================" >>$LOGFILE
for filename in $(echo * 2>/dev/null)
do
if (($(head -1 $filename | grep -e "006929681900" | wc -l) == 1));
then
1>>$LOGFILE 2>>$LOGFILE sqlplus -s $DBCONN <<EOF
whenever sqlerror exit 99
set serveroutput on
set feedback off
execute edi.process_edi('$filename');
exit
EOF
fi
done
I appreciate if I can get some real quick help on this bcoz i need to put this in production asap.
Thanks,
Raj.