The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 02-08-2007
Rock Rock is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 23
If..elif..else...fi

Hi all,


I got some problems on executing the following scripts.

Scripts:
if [[ ${var1} == 1 ]]; then
echo "M${str}O 0 1" >> ${tempFile}
elif [[ ${var2} == "U"]]; then
echo "M${str}O 1 0" >> ${tempFile}
else
echo "M${str}O 0 0" >> ${tempFile}
fi

Error:
"`;' is not expected."

what's the problem?


Thanks,
Rock