![]() |
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 |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| problem with if statement equality | cleansing_flame | Shell Programming and Scripting | 1 | 02-12-2008 10:57 AM |
| Case statement problem | gzs553 | UNIX for Advanced & Expert Users | 6 | 11-14-2006 04:24 PM |
| if statement problem | djt0506 | UNIX for Dummies Questions & Answers | 4 | 12-04-2005 08:16 PM |
| problem with an IF statement | hcclnoodles | Shell Programming and Scripting | 2 | 04-17-2003 11:53 AM |
| if statement problem | coughlin74 | UNIX for Dummies Questions & Answers | 1 | 09-27-2001 05:31 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
If Statement Problem..
The problem I am having here is that only the 1st option is executed, no matter if I pick yes or no. What am I doing wrong? How can I get this working right without resorting to a case statement?
Code:
echo "This is the max size your lvol can be:"
echo $MAXSIZE
echo
echo Do you want to max out the size of your lvol?
print -n "Enter 'y' for Yes or 'n' for No :"
read ANSWER3
if [ $ANSWER3="n" ] || [ $ANSWER3="N" ] || [ $ANSWER3="no" ] || [ $ANSWER3="No" ]
then
exit
else
continue
fi
if [ $ANSWER3="y" ] || [ $ANSWER3="Y" ] || [ $ANSWER3="yes" ] || [ $ANSWER3="Yes" ]
then
echo
echo "vxassist -g $DISKGROUP growto $LVOL $MAXSIZE"
vxassist -g $DISKGROUP growto $LVOL $MAXSIZE
exit
else
exit
fi
|
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|