The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
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 06-24-2009
strasner strasner is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 16
until statement not working

im trying to write an until statement which dont go onto the next stage until the user inputs a certain phrase. It is then stored in an array. Ive come up with this code so far but its not working and i dont know why.

Code:
read in1
    until [ $in1 = 'lt' || $in1 = 't' || $in1 = 'rt' ]
        do 
        echo "Incorrect, try again"
        read in1
        done
    arr[$i]=$in1

please help me