the script:
#!/bin/sh
if [ -e "/home/mailspool/checee/sema4.file" ]
then
nCount=0
while [ "$nCount" -lt 9 ]
do
echo step $nstep
sleep 1
if [ -e "/home/mailspool/checee/sema4.file" ]
then
sleep 1
nCount=`expr $nCount + 1`
else
echo 'busy with ' >> /home/mailspool/checee/sema4.file
echo $extension >> /home/mailspool/checee/sema4.file
nCount=30
fi
done
ftp -in <<END_SCRIPT
open ftp.ourplace.tld
user 1234 5678
bin
hash
prompt
cd smrsh
put in.$extension
bye
END_SCRIPT
\rm /home/mailspool/checee/sema4.file
When i used EOF it worked fine, but I can no longer use EOF as i want to erase the semaphore file.
But now the script runs but no ftp is even attempted. What am I getting wrong?