Hi expert
i wrote a shell scrip when i run it by cron i got this message in cron log file:
stty: standard input: Invalid argument
i did some search but i couldnt find any answer for that. could you pls help me
this ispart of my scrip and error message shows up after ping to server and before check bzy file. it seems this error doent interrupt the script from running.
#!/bin/sh
PATH=$PATH:/usr/bin:/usr/u
cb:/usr/bi
n/X11:/usr
/sbin:/sbi
n:/usr/etc
:/etc:/usr
/local/bin
:/usr2/loc
al/bin:/in
formix/bin
:/usr2/rep
orting/cvs
-bprpt/scr
ipt:/usr2/
reporting/
bin:/usr4/
faran/view
edi
EDIDIR=/usr4/faran
BIN=$EDIDIR/edi_script
ID=$1
FI=$2
PREFIX=$3
TIME_STAMP=`date +%H%M%S`
TMPDIR=$EDIDIR/cd_batch
tmpfile=$TMPDIR/$FI.dat
OFILE=$PREFIX$TIME_STAMP.E
DI
THELOG=/usr2/logfile/edi_t
ranscd.log
echo "oFile $OFILE"
# -------- check to see if there is a file ---------------/
cd $EDIDIR/files5
i=`ls *.$ID 2> /dev/null |wc -l `
if(test "$i" -eq 0) then
echo "no such file"
exit 0
fi
# ------- check connection to ftpserver -----/
ping c2kaftqa.cucbc.com -c 4 2>> $THELOG >> $THELOG
echo "connect to server $?"
if(test $? -ne 0)
then
echo "edi_tocd:`date` - No connection to ftp server c2kaftqa.cucbc.com" >> $THELOG
sendmon 1 "edi_tocd: No connection to ftpserver BBSFTP, please check ftpserver A.S.A.P"
exit 1
fi
# ------- check bzy file time stamp -----/
/usr4/edi/edi_script/check
_connect_d
irect.tand
em $FI "bzy"
echo "check bzy $?"
if (test $? -ne 0 )
then
echo "Please check edica$ID.bzy file under $FI on ftpserver, transmission has been hold"
sendmon 1 "edi_tocd: Pls. check edica$ID.bzy file under $FI on ftpserver, transmission stopped"
exit 1
fi
thanks a lot
Far22
Start Free Trial