The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 -->
  #2 (permalink)  
Old 10-11-2008
Franklin52 Franklin52 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2007
Posts: 4,212
The syntax of the if statement is not proper, replace the if and elif statement with:

Code:
if [ "$choice" -eq 1 ]

and

elif [ "$choice" -eq 2 ]
Beware of the spaces around the brackets.

Please place your code between code tags next time to improve readability. Select your code and click on the # symbol above the editing window.

Regards