I am getting an unexpected ";" in a Korn shell script to be run on an AIX server. Here is the code that is giving me trouble:
case $answer in
echo 'This script is designed to be run prior to processing'
echo 'iforms for a given database. It deletes any existing'
echo 'iform files in order to prevent duplication of claims.'
echo 'Enter the PCN office number to prep for iforms: '
ls -l |grep iforms.*
ls -l |grep hcfa.dat
if [ -a iforms.* ] ; then
rm -i iforms.*
else if [ -a hcfa.dat ] ; then
rm -i hcfa.dat
echo 'No iform files were found. Go ahead and run iforms.'
The line with the "hold ;;" is giving me the error. Hold is a function used pause between menu items echoed above. I have modeled this case statement after others that run on this system. If I take out the function call I still get the error. I get the error with one or two ";". I am using the if statements in a seperate script successfully. Any suggestions????