![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| rsync - exclude statement not working | em23 | Shell Programming and Scripting | 1 | 08-21-2008 06:47 PM |
| How is use sselect statement o/p in insert statement. | nkosaraju | Shell Programming and Scripting | 2 | 08-06-2008 09:26 PM |
| If statement not working | Hazmeister | Shell Programming and Scripting | 6 | 12-13-2007 04:33 AM |
| korn shell to bash - statement not working | brdholman | UNIX for Dummies Questions & Answers | 5 | 10-15-2007 09:49 AM |
| find/if statement not working | geomonap | Shell Programming and Scripting | 12 | 12-16-2005 09:56 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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
|
|
||||
|
Quote:
Code:
until [ $in1 = 'lt' || $in1 = 't' || $in1 = 'rt' ] Code:
until [ $in1 = 'lt' -o $in1 = 't' -o $in1 = 'rt' ] Code:
until [[ $in1 = 'lt' || $in1 = 't' || $in1 = 'rt' ]] |
|
||||
|
thanks alot, youve saved my morning
|
| Sponsored Links | ||
|
|