syntax error at line 752: `end of file' unexpected

Hi,

I'm having a syntax error at line 752: `end of file' unexpected. However, i didn't make any changes on line 752. I just inserted a new code in an existing program. Can anyone please check if there is something wrong with my code:

   if [ -f "$badfile" ]
   then
      lline=`tail -5 $badfile`
      echo $lline > errorlogs.dat
      uuencode errorlogs.dat errorlogs.dat | mailx  -s "Last  five bad files for inbound interface" xxx@yahoo-ept.com
   fi

Thanks...

There is something that you forgot to close (matching bracket, if/then/fi, while/do etc.).

Use a "bash -x" or "sh -x" to diagnose how exactly is your program running and use a good text editor with syntax coloring and auto-indentation to help you.

Hi,

I already did what you said. I've placed a set -x at the beginning of the script. It was successfully processed until it reaches to this end very last part of the code where the error occured. I even used the a tool to determine the difference between the old and new code. I've attached a document showing there difference.

Thanks a lot! :slight_smile:

Please correct my if I'm wrong, but you've posted a screenshot, pasted in a Microsoft Office document on a Unix forum?!